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_oci/tests/bug65946.phpt ('OCI 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: PDOStatement::execute(): SQLSTATE[HY000]: General error: 933 OCIStmtExecute: ORA-00933: SQL command not properly ended
 (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148) in /var/php_gcov/PHP_5_4/ext/pdo_oci/tests/bug65946.php on line 10
array(3) {
  [0]=>
  string(5) "HY000"
  [1]=>
  int(933)
  [2]=>
  string(114) "OCIStmtExecute: ORA-00933: SQL command not properly ended
 (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148)"
}

Warning: PDOStatement::execute(): SQLSTATE[HY000]: General error: 933 OCIStmtExecute: ORA-00933: SQL command not properly ended
 (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148) in /var/php_gcov/PHP_5_4/ext/pdo_oci/tests/bug65946.php on line 11
array(3) {
  [0]=>
  string(5) "HY000"
  [1]=>
  int(933)
  [2]=>
  string(114) "OCIStmtExecute: ORA-00933: SQL command not properly ended
 (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148)"
}
array(0) {
}

Diff

# original source file: ext/pdo/tests/bug65946.phpt
001+ Warning: PDOStatement::execute(): SQLSTATE[HY000]: General error: 933 OCIStmtExecute: ORA-00933: SQL command not properly ended
002+  (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148) in /var/php_gcov/PHP_5_4/ext/pdo_oci/tests/bug65946.php on line 10
003+ array(3) {
001- array(1) {
003-   array(1) {
004-     ["id"]=>
005-     string(1) "1"
006-   }
005+   string(5) "HY000"
006+   [1]=>
007+   int(933)
008+   [2]=>
009+   string(114) "OCIStmtExecute: ORA-00933: SQL command not properly ended
010+  (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148)"
012+ 
013+ Warning: PDOStatement::execute(): SQLSTATE[HY000]: General error: 933 OCIStmtExecute: ORA-00933: SQL command not properly ended
014+  (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148) in /var/php_gcov/PHP_5_4/ext/pdo_oci/tests/bug65946.php on line 11
015+ array(3) {
016+   [0]=>
017+   string(5) "HY000"
018+   [1]=>
019+   int(933)
020+   [2]=>
021+   string(114) "OCIStmtExecute: ORA-00933: SQL command not properly ended
022+  (/var/php_gcov/PHP_5_4/ext/pdo_oci/oci_statement.c:148)"
023+ }
024+ array(0) {
025+ }

 

Generated at Sat, 15 Nov 2014 06:19:47 +0000 (5 days ago)

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