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/pecl_bug_5809.phpt ('ODBC PDO Common: PECL Bug #5809 (PDOStatement::execute(array()) changes param)')

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:
$db PDOTest::factory();
5:
6:
$db->exec("CREATE TABLE test (id int NOT NULL, PRIMARY KEY (id))");
7:
$db->exec("INSERT INTO test (id) VALUES (1)");
8:
9:
$values = array(1);
10:
var_dump($values);
11:
$stmt $db->prepare('SELECT * FROM test WHERE id = ?');
12:
$stmt->execute($values);
13:
var_dump($values);
14:
15:

Expected

array(1) {
  [0]=>
  int(1)
}
array(1) {
  [0]=>
  int(1)
}

Output

array(1) {
  [0]=>
  int(1)
}

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/pecl_bug_5809.php on line 12
array(1) {
  [0]=>
  int(1)
}

Diff

# original source file: ext/pdo/tests/pecl_bug_5809.phpt
005+ 
006+ 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/pecl_bug_5809.php on line 12

 

Generated at Mon, 15 Dec 2014 17:02:57 +0000 (2 days ago)

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