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

Test Failure Report for ext/odbc/tests/bug73725.phpt ('Bug #73725 Unable to retrieve value of varchar(max) type')

Script

1: <?php
2:
3:
include dirname(__FILE__) . "/config.inc";
4:
5:
$conn odbc_connect($dsn$user$pass);
6:
7:
odbc_do($conn"CREATE TABLE bug73725(i int, txt varchar(max), k int)");
8:
9:
odbc_do($conn"INSERT INTO bug73725 VALUES(101,'Any text', 33)");
10:
odbc_do($conn"INSERT INTO bug73725 VALUES(102,'Müsliriegel', 34)");
11:
12:
$rc odbc_do($conn"SELECT i, txt, k FROM bug73725");
13:
14:
$r odbc_fetch_array($rc);
15:
var_dump($r);
16:
17:
$r odbc_fetch_array($rc);
18:
var_dump($r);
19:
20:
?>
21:
==DONE==
22:

Expected

array(3) {
  ["i"]=>
  string(3) "101"
  ["txt"]=>
  string(8) "Any text"
  ["k"]=>
  string(2) "33"
}
array(3) {
  ["i"]=>
  string(3) "102"
  ["txt"]=>
  string(12) "Müsliriegel"
  ["k"]=>
  string(2) "34"
}
==DONE==

Output

Warning: odbc_do(): 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), k int)' at line 1, SQL state 37000 in SQLExecDirect in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 7

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

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

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

Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 14
NULL

Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 17
NULL
==DONE==

Diff

001+ Warning: odbc_do(): 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), k int)' at line 1, SQL state 37000 in SQLExecDirect in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 7
002+ 
003+ Warning: odbc_do(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.bug73725' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 9
004+ 
005+ Warning: odbc_do(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.bug73725' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 10
006+ 
007+ Warning: odbc_do(): SQL error: [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Table 'odbcDB.bug73725' doesn't exist, SQL state S0002 in SQLExecDirect in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 12
008+ 
009+ Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 14
010+ NULL
011+ 
012+ Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in /var/php_gcov/PHP_7_1/ext/odbc/tests/bug73725.php on line 17
013+ NULL
001- array(3) {
002-   ["i"]=>
003-   string(3) "101"
004-   ["txt"]=>
005-   string(8) "Any text"
006-   ["k"]=>
007-   string(2) "33"
008- }
009- array(3) {
010-   ["i"]=>
011-   string(3) "102"
012-   ["txt"]=>
013-   string(12) "Müsliriegel"
014-   ["k"]=>
015-   string(2) "34"
016- }

 

Generated at Sat, 22 Sep 2018 10:27:05 +0000 (4 days ago)

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