Test Failure Report for ext/pdo_odbc/tests/pdo_016a.phpt ('ODBC PDO Common: PDO::FETCH_BOUND w/o :')
Script
1:
<?php 2: if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 3: require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; 4: $db = PDOTest::factory(); 5: 6: if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { 7: $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); 8: } 9: 10: $db->exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); 11: $db->exec('INSERT INTO test VALUES(0, \'String0\')'); 12: $db->exec('INSERT INTO test VALUES(1, \'String1\')'); 13: $db->exec('INSERT INTO test VALUES(2, \'String2\')'); 14: 15: $stmt1 = $db->prepare('SELECT COUNT(idx) FROM test'); 16: $stmt2 = $db->prepare('SELECT idx, txt FROM test ORDER by idx'); 17: 18: $stmt1->execute(); 19: var_dump($stmt1->fetchColumn()); 20: $stmt1 = null; 21: 22: $stmt2->execute(); 23: $cont = $stmt2->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_UNIQUE); 24: var_dump($cont); 25: 26: echo "===WHILE===\n"; 27: 28: $stmt2->bindColumn('idx', $idx); 29: $stmt2->bindColumn('txt', $txt); 30: $stmt2->execute(); 31: 32: while($stmt2->fetch(PDO::FETCH_BOUND)) { 33: var_dump(array($idx=>$txt)); 34: } 35: 36: echo "===ALONE===\n"; 37: 38: $stmt3 = $db->prepare('SELECT txt FROM test WHERE idx=:inp'); 39: $stmt3->bindParam('inp', $idx); /* by foreign name */ 40: 41: $stmt4 = $db->prepare('SELECT idx FROM test WHERE txt=:txt'); 42: $stmt4->bindParam('txt', $txt); /* using same name */ 43: 44: foreach($cont as $idx => $txt) 45: { 46: var_dump(array($idx=>$txt)); 47: var_dump($stmt3->execute()); 48: 49: if ($idx == 0) { 50: /* portability-wise, you may only bindColumn()s 51: * after execute() has been called at least once */ 52: $stmt3->bindColumn('txt', $col1); 53: } 54: var_dump($stmt3->fetch(PDO::FETCH_BOUND)); 55: $stmt3->closeCursor(); 56: 57: var_dump($stmt4->execute()); 58: if ($idx == 0) { 59: /* portability-wise, you may only bindColumn()s 60: * after execute() has been called at least once */ 61: $stmt4->bindColumn('idx', $col2); 62: } 63: var_dump($stmt4->fetch(PDO::FETCH_BOUND)); 64: $stmt4->closeCursor(); 65: var_dump(array($col2=>$col1)); 66: } 67: 68: echo "===REBIND/SAME===\n"; 69: 70: $stmt4->bindColumn('idx', $col1); 71: 72: foreach($cont as $idx => $txt) 73: { 74: var_dump(array($idx=>$txt)); 75: var_dump($stmt3->execute()); 76: var_dump($stmt3->fetch(PDO::FETCH_BOUND)); 77: $stmt3->closeCursor(); 78: var_dump($col1); 79: var_dump($stmt4->execute()); 80: var_dump($stmt4->fetch(PDO::FETCH_BOUND)); 81: $stmt4->closeCursor(); 82: var_dump($col1); 83: } 84: 85: echo "===REBIND/CONFLICT===\n"; 86: 87: $stmt2->bindColumn('idx', $col1); 88: $stmt2->bindColumn('txt', $col1); 89: $stmt2->execute(); 90: 91: while($stmt2->fetch(PDO::FETCH_BOUND)) 92: { 93: var_dump($col1); 94: } 95: 96: 97: ?> 98:
Expected
string(1) "3"
array(3) {
[0]=>
string(7) "String0"
[1]=>
string(7) "String1"
[2]=>
string(7) "String2"
}
===WHILE===
array(1) {
[0]=>
string(7) "String0"
}
array(1) {
[1]=>
string(7) "String1"
}
array(1) {
[2]=>
string(7) "String2"
}
===ALONE===
array(1) {
[0]=>
string(7) "String0"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[0]=>
string(7) "String0"
}
array(1) {
[1]=>
string(7) "String1"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[1]=>
string(7) "String1"
}
array(1) {
[2]=>
string(7) "String2"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[2]=>
string(7) "String2"
}
===REBIND/SAME===
array(1) {
[0]=>
string(7) "String0"
}
bool(true)
bool(true)
string(7) "String0"
bool(true)
bool(true)
string(1) "0"
array(1) {
[1]=>
string(7) "String1"
}
bool(true)
bool(true)
string(7) "String1"
bool(true)
bool(true)
string(1) "1"
array(1) {
[2]=>
string(7) "String2"
}
bool(true)
bool(true)
string(7) "String2"
bool(true)
bool(true)
string(1) "2"
===REBIND/CONFLICT===
string(7) "String0"
string(7) "String1"
string(7) "String2"
Output
string(1) "3"
array(3) {
[0]=>
string(7) "String0"
[1]=>
string(7) "String1"
[2]=>
string(7) "String2"
}
===WHILE===
array(1) {
[0]=>
string(7) "String0"
}
array(1) {
[1]=>
string(7) "String1"
}
array(1) {
[2]=>
string(7) "String2"
}
===ALONE===
array(1) {
[0]=>
string(7) "String0"
}
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 47
bool(false)
bool(false)
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 57
bool(false)
bool(false)
array(1) {
[""]=>
NULL
}
array(1) {
[1]=>
string(7) "String1"
}
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 47
bool(false)
bool(false)
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 57
bool(false)
bool(false)
array(1) {
[""]=>
NULL
}
array(1) {
[2]=>
string(7) "String2"
}
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 47
bool(false)
bool(false)
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 57
bool(false)
bool(false)
array(1) {
[""]=>
NULL
}
===REBIND/SAME===
array(1) {
[0]=>
string(7) "String0"
}
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 75
bool(false)
bool(false)
NULL
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 79
bool(false)
bool(false)
NULL
array(1) {
[1]=>
string(7) "String1"
}
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 75
bool(false)
bool(false)
NULL
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 79
bool(false)
bool(false)
NULL
array(1) {
[2]=>
string(7) "String2"
}
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 75
bool(false)
bool(false)
NULL
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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 79
bool(false)
bool(false)
NULL
===REBIND/CONFLICT===
string(7) "String0"
string(7) "String1"
string(7) "String2"
Diff
# original source file: ext/pdo/tests/pdo_016a.phpt
028+
029+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 47
030+ bool(false)
031+ bool(false)
032+
033+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 57
034+ bool(false)
035+ bool(false)
036+ array(1) {
037+ [""]=>
038+ NULL
028- bool(true)
029- bool(true)
030- bool(true)
031- bool(true)
032- array(1) {
033- [0]=>
034- string(7) "String0"
040- bool(true)
041- bool(true)
042- bool(true)
043- bool(true)
044- array(1) {
045- [1]=>
046- string(7) "String1"
044+
045+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 47
046+ bool(false)
047+ bool(false)
048+
049+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 57
050+ bool(false)
051+ bool(false)
052+ array(1) {
053+ [""]=>
054+ NULL
052- bool(true)
053- bool(true)
054- bool(true)
055- bool(true)
056- array(1) {
057- [2]=>
058- string(7) "String2"
060+
061+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 47
062+ bool(false)
063+ bool(false)
064+
065+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 57
066+ bool(false)
067+ bool(false)
068+ array(1) {
069+ [""]=>
070+ NULL
065- bool(true)
066- bool(true)
067- string(7) "String0"
068- bool(true)
069- bool(true)
070- string(1) "0"
075- bool(true)
076- bool(true)
077- string(7) "String1"
078- bool(true)
079- bool(true)
080- string(1) "1"
077+
078+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 75
079+ bool(false)
080+ bool(false)
081+ NULL
082+
083+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 79
084+ bool(false)
085+ bool(false)
086+ NULL
085- bool(true)
086- bool(true)
087- string(7) "String2"
088- bool(true)
089- bool(true)
090- string(1) "2"
091+
092+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 75
093+ bool(false)
094+ bool(false)
095+ NULL
096+
097+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 79
098+ bool(false)
099+ bool(false)
100+ NULL
105+
106+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 75
107+ bool(false)
108+ bool(false)
109+ NULL
110+
111+ 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_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_016a.php on line 79
112+ bool(false)
113+ bool(false)
114+ NULL
Generated at Wed, 15 May 2013 22:03:26 +0000 (4 days ago)
|