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

Test Failure Report for ext/odbc/tests/bug69975.phpt ('Bug #69975 (PHP segfaults when accessing nvarchar(max) defined columns)')

Script

1: <?php
2:
include 'config.inc';
3:
4:
$conn odbc_connect($dsn$user$pass);
5: @
odbc_exec($conn'CREATE DATABASE odbcTEST');
6:
odbc_exec($conn'CREATE TABLE FOO (ID INT, VARCHAR_COL NVARCHAR(MAX))');
7:
odbc_exec($conn"INSERT INTO FOO VALUES (1, 'foo')");
8:
9:
$result odbc_exec($conn"SELECT VARCHAR_COL FROM FOO");
10:
var_dump(odbc_fetch_array($result));
11:
12: echo 
"ready";
13:
?>
14:

Expected

array(1) {
  ["VARCHAR_COL"]=>
  string(3) "foo"
}
ready

Output

Warning: odbc_exec(): SQL error: [unixODBC][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 'MAX))' at line 1, SQL state 37000 in SQLExecDirect in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 6

Warning: odbc_exec(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.FOO' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 7

Warning: odbc_exec(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.FOO' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 9

Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 10
NULL
ready

Diff

001+ Warning: odbc_exec(): SQL error: [unixODBC][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 'MAX))' at line 1, SQL state 37000 in SQLExecDirect in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 6
002+ 
003+ Warning: odbc_exec(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.FOO' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 7
004+ 
005+ Warning: odbc_exec(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.FOO' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 9
006+ 
007+ Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in /var/php_gcov/PHP_HEAD/ext/odbc/tests/bug69975.php on line 10
008+ NULL
001- array(1) {
002-   ["VARCHAR_COL"]=>
003-   string(3) "foo"
004- }

 

Generated at Sun, 12 Nov 2017 21:17:35 +0000 (11 days ago)

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