PHP  
 PHP_5_4
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_odbc/tests/bug_38394.phpt ('ODBC PDO Common: Bug #38394 (Prepared statement error stops subsequent statements)')

Script

1: <?php
2:
if (getenv('REDIR_TEST_DIR') === falseputenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 
3: require_once 
getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
4:
5:
$db PDOTest::factory();
6:
$db->exec("CREATE TABLE test (a INT, b INT, c INT)");
7:
$s $db->prepare("INSERT INTO test (a,b,c) VALUES (:a,:b,:c)");
8:
9:
$s->execute(array('a' => 1'b' => 2'c' => 3));
10:
11: @
$s->execute(array('a' => 5'b' => 6'c' => 7'd' => 8));
12:
13:
$s->execute(array('a' => 9'b' => 10'c' => 11));
14:
15:
var_dump($db->query("SELECT * FROM test")->fetchAll(PDO::FETCH_ASSOC));
16:
?>
17:
===DONE===
18:

Expected

array(2) {
  [0]=>
  array(3) {
    ["a"]=>
    string(1) "1"
    ["b"]=>
    string(1) "2"
    ["c"]=>
    string(1) "3"
  }
  [1]=>
  array(3) {
    ["a"]=>
    string(1) "9"
    ["b"]=>
    string(2) "10"
    ["c"]=>
    string(2) "11"
  }
}
===DONE===

Output

Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]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_5_4/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_4/ext/pdo_odbc/tests/bug_38394.php on line 9

Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]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_5_4/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_4/ext/pdo_odbc/tests/bug_38394.php on line 13
array(0) {
}
===DONE===

Diff

# original source file: ext/pdo/tests/bug_38394.phpt
001+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]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_5_4/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_4/ext/pdo_odbc/tests/bug_38394.php on line 9
002+ 
003+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]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_5_4/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_4/ext/pdo_odbc/tests/bug_38394.php on line 13
004+ array(0) {
005+ }
006+ ===DONE===
001- array(2) {
002-   [0]=>
003-   array(3) {
004-     ["a"]=>
005-     string(1) "1"
006-     ["b"]=>
007-     string(1) "2"
008-     ["c"]=>
009-     string(1) "3"
010-   }
011-   [1]=>
012-   array(3) {
013-     ["a"]=>
014-     string(1) "9"
015-     ["b"]=>
016-     string(2) "10"
017-     ["c"]=>
018-     string(2) "11"
019-   }
020- }
021- ===DONE===

 

Generated at Thu, 10 Apr 2014 08:54:04 +0000 (8 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.