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

Test Failure Report for ext/pdo_firebird/tests/bug65946.phpt ('FIREBIRD Bug #65946 (pdo_sql_parser.c permanently converts values bound to strings)')

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:
$db->setAttribute(PDO::ATTR_EMULATE_PREPAREStrue);
6:
$db->exec('CREATE TABLE test(id int)');
7:
$db->exec('INSERT INTO test VALUES(1)');
8:
$stmt $db->prepare('SELECT * FROM test LIMIT :limit');
9:
$stmt->bindValue('limit'1PDO::PARAM_INT);
10: if(!(
$res $stmt->execute())) var_dump($stmt->errorInfo());
11: if(!(
$res $stmt->execute())) var_dump($stmt->errorInfo());
12:
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
13:
?>
14:

Expected

array(1) {
  [0]=>
  array(1) {
    ["id"]=>
    string(1) "1"
  }
}

Output

Warning: PDO::prepare(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 26 ?  in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug65946.php on line 8

Fatal error: Call to a member function bindValue() on boolean in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug65946.php on line 9

Diff

# original source file: ext/pdo/tests/bug65946.phpt
001+ Warning: PDO::prepare(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 26 ?  in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug65946.php on line 8
002+ 
003+ Fatal error: Call to a member function bindValue() on boolean in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug65946.php on line 9
001- array(1) {
002-   [0]=>
003-   array(1) {
004-     ["id"]=>
005-     string(1) "1"
006-   }
007- }

 

Generated at Mon, 20 Oct 2014 09:57:58 +0000 (5 days ago)

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