Test Failure Report for ext/pdo_odbc/tests/bug_36798.phpt ('ODBC PDO Common: Bug #36798 (Error parsing named parameters with queries containing high-ascii chars)')
Script
1:
<?php 2: 3: if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 4: require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; 5: $db = PDOTest::factory(); 6: 7: @$db->exec("SET NAMES 'LATIN1'"); // needed for PostgreSQL 8: $db->exec("CREATE TABLE test (id INTEGER)"); 9: $db->exec("INSERT INTO test (id) VALUES (1)"); 10: 11: $stmt = $db->prepare("SELECT 'Ã' as test FROM test WHERE id = :id"); 12: $stmt->execute(array(":id" => 1)); 13: 14: $row = $stmt->fetch(PDO::FETCH_NUM); 15: var_dump( $row ); 16: 17: ?> 18:
Expected
array(1) {
[0]=>
string(1) "Ã"
}
Output
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_HEAD/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_HEAD/ext/pdo_odbc/tests/bug_36798.php on line 12
bool(false)
Diff
# original source file: ext/pdo/tests/bug_36798.phpt
001+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_HEAD/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_HEAD/ext/pdo_odbc/tests/bug_36798.php on line 12
002+ bool(false)
001- array(1) {
002- [0]=>
003- string(1) "Ã"
004- }
Generated at Fri, 17 May 2013 23:23:52 +0000 (21 hours ago)
|