cvs: php-src /ext/mysqli/tests 003.phpt 004.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010.phpt 013.phpt 020.phpt 023.phpt 024.phpt 025.phpt 026.phpt
042.phpt 060.phpt 065.phpt bug32405.phpt bug35103.phpt bug35517.phpt bug35759.phpt

From: Date: Wed, 04 Jan 2006 23:04:07 +0000
Subject: cvs: php-src /ext/mysqli/tests 003.phpt 004.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010.phpt 013.phpt 020.phpt 023.phpt 024.phpt 025.phpt 026.phpt
042.phpt 060.phpt 065.phpt bug32405.phpt bug35103.phpt bug35517.phpt bug35759.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-36400@lists.php.net to get a copy of this message
andrey Wed Jan 4 23:04:07 2006 UTC Modified files: /php-src/ext/mysqli/tests bug35103.phpt bug35517.phpt bug35759.phpt 003.phpt 004.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010.phpt 013.phpt 020.phpt 023.phpt 024.phpt 025.phpt 026.phpt 042.phpt 060.phpt 065.phpt bug32405.phpt Log: bring tests up-to-date with 5_1 branch #few are failing and will stop failing when bugfixes are upmerged from 5_1

http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/bug35103.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mysqli/tests/bug35103.phpt diff -u /dev/null php-src/ext/mysqli/tests/bug35103.phpt:1.2 --- /dev/null Wed Jan 4 23:04:07 2006 +++ php-src/ext/mysqli/tests/bug35103.phpt Wed Jan 4 23:04:06 2006 @@ -0,0 +1,68 @@ +--TEST-- +bug #35103 Bad handling of unsigned bigint +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$drop = <<<EOSQL +DROP TABLE test_bint; +DROP TABLE test_buint; +EOSQL; + include "connect.inc"; + + $mysql = new mysqli($host, $user, $passwd, "test"); + $mysql->query("DROP TABLE IF EXISTS test_bint"); + $mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL) ENGINE=MYISAM"); + $mysql->query("INSERT INTO test_bint VALUES (9223372036854775807),(-9223372036854775808),(-2147483648),(-2147483649),(-2147483647),(2147483647),(2147483648),(2147483649)"); + + $mysql->query("DROP TABLE IF EXISTS test_buint"); + $mysql->query("CREATE TABLE test_buint (a bigint(20) unsigned default NULL)"); + $mysql->query("INSERT INTO test_buint VALUES (18446744073709551615),(9223372036854775807),(9223372036854775808),(2147483647),(2147483649),(4294967295)"); + + $stmt = $mysql->prepare("SELECT a FROM test_bint ORDER BY a"); + $stmt->bind_result($v); + $stmt->execute(); + $i=0; + echo "BIG INT SIGNED, TEST\n"; + while ($i++ < 8) { + $stmt->fetch(); + echo $v, "\n"; + } + $stmt->close(); + + echo str_repeat("-", 20), "\n"; + + $stmt = $mysql->prepare("SELECT a FROM test_buint ORDER BY a"); + $stmt->bind_result($v2); + $stmt->execute(); + $j=0; + echo "BIG INT UNSIGNED TEST\n"; + while ($j++ < 6) { + $stmt->fetch(); + echo $v2, "\n"; + } + $stmt->close(); + + $mysql->multi_query($drop); + + $mysql->close(); +?> +--EXPECT-- +BIG INT SIGNED, TEST +-9223372036854775808 +-2147483649 +-2147483648 +-2147483647 +2147483647 +2147483648 +2147483649 +9223372036854775807 +-------------------- +BIG INT UNSIGNED TEST +2147483647 +2147483649 +4294967295 +9223372036854775807 +9223372036854775808 +18446744073709551615 http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/bug35517.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mysqli/tests/bug35517.phpt diff -u /dev/null php-src/ext/mysqli/tests/bug35517.phpt:1.2 --- /dev/null Wed Jan 4 23:04:07 2006 +++ php-src/ext/mysqli/tests/bug35517.phpt Wed Jan 4 23:04:06 2006 @@ -0,0 +1,29 @@ +--TEST-- +Bug #35517 mysqli_stmt_fetch returns NULL +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + include "connect.inc"; + + $mysql = new mysqli($host, $user, $passwd, "test"); + + $mysql->query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)"); + $mysql->query("INSERT INTO temp (id) VALUES (3000000897),(3800001532),(3900002281),(3100059612)"); + + $stmt = $mysql->prepare("SELECT id FROM temp"); + $stmt->execute(); + $stmt->bind_result($id); + while ($stmt->fetch()) { + var_dump($id); + } + $stmt->close(); + + $mysql->query("DROP TABLE temp"); + $mysql->close(); +?> +--EXPECTF-- +string(10) "3000000897" +string(10) "3800001532" +string(10) "3900002281" +string(10) "3100059612" http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/bug35759.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mysqli/tests/bug35759.phpt diff -u /dev/null php-src/ext/mysqli/tests/bug35759.phpt:1.2 --- /dev/null Wed Jan 4 23:04:07 2006 +++ php-src/ext/mysqli/tests/bug35759.phpt Wed Jan 4 23:04:06 2006 @@ -0,0 +1,44 @@ +--TEST-- +bug #35759 : mysqli_stmt_bind_result() makes huge allocation when column empty +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$sql=<<<EOSQL +CREATE TABLE blobby ( + a1 MEDIUMBLOB NOT NULL, + + +EOSQL; + include "connect.inc"; + $col_num= 1000; + + $mysql = new mysqli($host, $user, $passwd, "test"); + $mysql->query("DROP TABLE IF EXISTS blobby"); + $create = "CREATE TABLE blobby (a0 MEDIUMBLOB NOT NULL DEFAULT ''"; + $i= 0; + while (++$i < $col_num) { + $create .= ", a$i MEDIUMBLOB NOT NULL DEFAULT ''"; + } + $create .= ")"; + + $mysql->query($create); + $mysql->query("INSERT INTO blobby (a0) VALUES ('')"); + + $stmt = $mysql->prepare("SELECT * FROM blobby"); + $stmt->execute(); + $stmt->store_result(); + $params= array_pad(array(), $col_num, ""); + call_user_func_array(array($stmt, "bind_result"), $params); + $stmt->fetch(); + + $stmt->close(); + + $mysql->query("DROP TABLE blobby"); + + $mysql->close(); + echo "OK\n"; +?> +--EXPECT-- +OK http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/003.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/mysqli/tests/003.phpt diff -u php-src/ext/mysqli/tests/003.phpt:1.5 php-src/ext/mysqli/tests/003.phpt:1.6 --- php-src/ext/mysqli/tests/003.phpt:1.5 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/003.phpt Wed Jan 4 23:04:06 2006 @@ -7,9 +7,9 @@ include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd, "test"); - mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result"); mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/004.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mysqli/tests/004.phpt diff -u php-src/ext/mysqli/tests/004.phpt:1.4 php-src/ext/mysqli/tests/004.phpt:1.5 --- php-src/ext/mysqli/tests/004.phpt:1.4 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/004.phpt Wed Jan 4 23:04:06 2006 @@ -14,16 +14,21 @@ mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)"); - mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test0')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567891', 'this is a test1')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567892', 'this is a test2')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567893', 'this is a test3')"); - $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch"); + $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1"); mysqli_bind_result($stmt, $c1, $c2); mysqli_execute($stmt); - mysqli_fetch($stmt); + $i=4; + while ($i--) { + mysqli_fetch($stmt); + $test = array($c1,$c2); + var_dump($test); + } - $test = array($c1,$c2); - - var_dump($test); mysqli_stmt_close($stmt); mysqli_close($link); @@ -33,5 +38,23 @@ [0]=> string(10) "1234567890" [1]=> - string(14) "this is a test" + string(15) "this is a test0" +} +array(2) { + [0]=> + string(10) "1234567891" + [1]=> + string(15) "this is a test1" +} +array(2) { + [0]=> + string(10) "1234567892" + [1]=> + string(15) "this is a test2" +} +array(2) { + [0]=> + string(10) "1234567893" + [1]=> + string(15) "this is a test3" } http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/006.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mysqli/tests/006.phpt diff -u php-src/ext/mysqli/tests/006.phpt:1.4 php-src/ext/mysqli/tests/006.phpt:1.5 --- php-src/ext/mysqli/tests/006.phpt:1.4 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/006.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 int unsigned, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/007.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mysqli/tests/007.phpt diff -u php-src/ext/mysqli/tests/007.phpt:1.4 php-src/ext/mysqli/tests/007.phpt:1.5 --- php-src/ext/mysqli/tests/007.phpt:1.4 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/007.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/008.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mysqli/tests/008.phpt diff -u php-src/ext/mysqli/tests/008.phpt:1.4 php-src/ext/mysqli/tests/008.phpt:1.5 --- php-src/ext/mysqli/tests/008.phpt:1.4 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/008.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 tinyint, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/009.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/mysqli/tests/009.phpt diff -u php-src/ext/mysqli/tests/009.phpt:1.6 php-src/ext/mysqli/tests/009.phpt:1.7 --- php-src/ext/mysqli/tests/009.phpt:1.6 Wed Jul 20 00:18:24 2005 +++ php-src/ext/mysqli/tests/009.phpt Wed Jan 4 23:04:06 2006 @@ -1,5 +1,5 @@ --TEST-- -mysqli fetch bigint values +mysqli fetch bigint values (ok to fail with 4.1.x) --SKIPIF-- <?php if (PHP_INT_SIZE == 8) { @@ -16,6 +16,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 bigint default 5, @@ -38,8 +39,25 @@ var_dump($test); mysqli_stmt_close($stmt); + + mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch_uint"); + mysqli_query($link,"CREATE TABLE test_bind_fetch_uint(c1 integer unsigned, c2 integer unsigned)"); + + mysqli_query($link, "INSERT INTO test_bind_fetch_uint (c1,c2) VALUES (20123456, 3123456789)"); + + $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch_uint"); + mysqli_bind_result($stmt, $c1, $c2); + mysqli_execute($stmt); + $rc = mysqli_fetch($stmt); + + echo $c1, "\n", $c2, "\n"; + + mysqli_stmt_close($stmt); + + mysqli_close($link); ?> + --EXPECT-- array(7) { [0]=> @@ -53,7 +71,9 @@ [4]=> int(0) [5]=> - string(13) "-333333333333" + int(0) [6]=> int(100) } +20123456 +3123456789 http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/010.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/mysqli/tests/010.phpt diff -u php-src/ext/mysqli/tests/010.phpt:1.5 php-src/ext/mysqli/tests/010.phpt:1.6 --- php-src/ext/mysqli/tests/010.phpt:1.5 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/010.phpt Wed Jan 4 23:04:06 2006 @@ -12,6 +12,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/013.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mysqli/tests/013.phpt diff -u php-src/ext/mysqli/tests/013.phpt:1.4 php-src/ext/mysqli/tests/013.phpt:1.5 --- php-src/ext/mysqli/tests/013.phpt:1.4 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/013.phpt Wed Jan 4 23:04:06 2006 @@ -25,7 +25,7 @@ $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result"); $c = array(0,0,0,0,0,0,0,0); - mysqli_bind_result($stmt, $c[0], $c[1], $c[2], $c[3], $c[4], $c[5], $c[6], $c[7]); + $b_res= mysqli_bind_result($stmt, $c[0], $c[1], $c[2], $c[3], $c[4], $c[5], $c[6], $c[7]); mysqli_execute($stmt); mysqli_fetch($stmt); mysqli_fetch($stmt); @@ -38,10 +38,15 @@ $test = ""; for ($i=0; $i < count($c); $i++) $test .= ($c[0] == $d[0]) ? "1" : "0"; - - var_dump($test); + if ($test == "11111111") + echo "ok"; + else if ($b_res == FALSE && mysqli_get_client_version() > 40100 && mysqli_get_client_version() < 50000 && + mysqli_get_server_version($link) > 50000) + echo "error (4.1 library with 5.x server)"; + else + echo "error"; mysqli_close($link); ?> ---EXPECT-- -string(8) "11111111" +--EXPECTF-- +ok http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/020.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/mysqli/tests/020.phpt diff -u php-src/ext/mysqli/tests/020.phpt:1.6 php-src/ext/mysqli/tests/020.phpt:1.7 --- php-src/ext/mysqli/tests/020.phpt:1.6 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/020.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result"); mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/023.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/mysqli/tests/023.phpt diff -u php-src/ext/mysqli/tests/023.phpt:1.5 php-src/ext/mysqli/tests/023.phpt:1.6 --- php-src/ext/mysqli/tests/023.phpt:1.5 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/023.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 int unsigned, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/024.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/mysqli/tests/024.phpt diff -u php-src/ext/mysqli/tests/024.phpt:1.5 php-src/ext/mysqli/tests/024.phpt:1.6 --- php-src/ext/mysqli/tests/024.phpt:1.5 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/024.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/025.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/mysqli/tests/025.phpt diff -u php-src/ext/mysqli/tests/025.phpt:1.5 php-src/ext/mysqli/tests/025.phpt:1.6 --- php-src/ext/mysqli/tests/025.phpt:1.5 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/025.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 tinyint, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/026.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/mysqli/tests/026.phpt diff -u php-src/ext/mysqli/tests/026.phpt:1.6 php-src/ext/mysqli/tests/026.phpt:1.7 --- php-src/ext/mysqli/tests/026.phpt:1.6 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/026.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 varchar(10), c2 text)"); http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/042.phpt?r1=1.7&r2=1.8&diff_format=u Index: php-src/ext/mysqli/tests/042.phpt diff -u php-src/ext/mysqli/tests/042.phpt:1.7 php-src/ext/mysqli/tests/042.phpt:1.8 --- php-src/ext/mysqli/tests/042.phpt:1.7 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/042.phpt Wed Jan 4 23:04:06 2006 @@ -10,6 +10,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/060.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mysqli/tests/060.phpt diff -u php-src/ext/mysqli/tests/060.phpt:1.3 php-src/ext/mysqli/tests/060.phpt:1.4 --- php-src/ext/mysqli/tests/060.phpt:1.3 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/060.phpt Wed Jan 4 23:04:06 2006 @@ -16,6 +16,7 @@ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_fetch"); mysqli_query($link,"CREATE TABLE test_fetch(c1 smallint unsigned, http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/065.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mysqli/tests/065.phpt diff -u php-src/ext/mysqli/tests/065.phpt:1.3 php-src/ext/mysqli/tests/065.phpt:1.4 --- php-src/ext/mysqli/tests/065.phpt:1.3 Mon Jun 27 10:34:42 2005 +++ php-src/ext/mysqli/tests/065.phpt Wed Jan 4 23:04:06 2006 @@ -12,6 +12,7 @@ include "connect.inc"; $mysql = new mysqli($host, $user, $passwd); + mysqli_query($mysql, "SET sql_mode=''"); $esc_str = chr(0xbf) . chr(0x5c); http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/tests/bug32405.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mysqli/tests/bug32405.phpt diff -u php-src/ext/mysqli/tests/bug32405.phpt:1.1 php-src/ext/mysqli/tests/bug32405.phpt:1.2 --- php-src/ext/mysqli/tests/bug32405.phpt:1.1 Tue Apr 19 13:29:37 2005 +++ php-src/ext/mysqli/tests/bug32405.phpt Wed Jan 4 23:04:06 2006 @@ -9,6 +9,7 @@ /*** test mysqli_connect 127.0.0.1 ***/ $link = mysqli_connect($host, $user, $passwd); mysqli_select_db($link, "test"); + mysqli_query($link, "SET sql_mode=''"); /* two fields are needed. the problem does not occur with 1 field only selected. */ $link->query("CREATE TABLE test_users(user_id int(10) unsigned NOT NULL auto_increment, login varchar(50) default '', PRIMARY KEY (user_id))");
« previous php.cvs (#36400) next »