[PHP-CVS] cvs: php-src /ext/mysqli/tests mysqli_constants.phpt
uw Fri May 29 13:22:47 2009 UTC Modified files: /php-src/ext/mysqli/tests mysqli_constants.phpt Log: Updating test to reflect API changes. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_constants.phpt?r1=1.8r2=1.9diff_format=u Index: php-src/ext/mysqli/tests/mysqli_constants.phpt diff -u php-src/ext/mysqli/tests/mysqli_constants.phpt:1.8 php-src/ext/mysqli/tests/mysqli_constants.phpt:1.9 --- php-src/ext/mysqli/tests/mysqli_constants.phpt:1.8 Thu Jan 22 21:56:46 2009 +++ php-src/ext/mysqli/tests/mysqli_constants.phpt Fri May 29 13:22:47 2009 @@ -50,7 +50,7 @@ MYSQLI_GROUP_FLAG = true, MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED= true, MYSQLI_SERVER_QUERY_NO_INDEX_USED = true, - + MYSQLI_TYPE_DECIMAL = true, MYSQLI_TYPE_TINY = true, MYSQLI_TYPE_SHORT = true, @@ -85,13 +85,14 @@ MYSQLI_REPORT_OFF = true, MYSQLI_SET_CHARSET_NAME = true, MYSQLI_REFRESH_GRANT = true, - MYSQLI_REFRESH_LOG= true, + MYSQLI_REFRESH_LOG= true, MYSQLI_REFRESH_TABLES = true, MYSQLI_REFRESH_HOSTS = true, MYSQLI_REFRESH_STATUS = true, MYSQLI_REFRESH_THREADS= true, MYSQLI_REFRESH_SLAVE = true, MYSQLI_REFRESH_MASTER = true, + MYSQLI_DEBUG_TRACE_ENABLED= true, ); /* depends on the build - experimental */ @@ -107,7 +108,6 @@ $version = 50007 + 1; $expected_constants['MYSQLI_OPT_NET_CMD_BUFFER_SIZE'] = true; $expected_constants['MYSQLI_OPT_NET_READ_BUFFER_SIZE'] = true; - $expected_constants['MYSQLI_DEBUG_TRACE_ENABLED'] = true; $expected_constants['MYSQLI_ASYNC'] = true; } else { @@ -118,8 +118,8 @@ $expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true; } if ($version 60005 || $IS_MYSQLND) { - $expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true; - } + $expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true; + } if ($version 50002) { $expected_constants = array_merge($expected_constants, array( @@ -158,10 +158,14 @@ } else if (!$IS_MYSQLND) { /* libmysql only */ - /* are they available in all versions of ext/mysqli ? */ - $expected_constants[MYSQLI_RPL_MASTER]= true; - $expected_constants[MYSQLI_RPL_SLAVE] = true; - $expected_constants[MYSQLI_RPL_ADMIN] = true; + /* are they available in all versions of ext/mysqli ? + ... no we must have removed them at some point - for BC, weakening the test + */ + if (defined(MYSQLI_RPL_MASTER)) { + $expected_constants[MYSQLI_RPL_MASTER]= true; + $expected_constants[MYSQLI_RPL_SLAVE] = true; + $expected_constants[MYSQLI_RPL_ADMIN] = true; + } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests mysqli_constants.phpt /ext/mysqlnd php_mysqlnd.c
andrey Tue Feb 19 15:38:24 2008 UTC Modified files: /php-src/ext/mysqli/tests mysqli_constants.phpt /php-src/ext/mysqlndphp_mysqlnd.c Log: Fix a compile warning + test http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_constants.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/mysqli/tests/mysqli_constants.phpt diff -u php-src/ext/mysqli/tests/mysqli_constants.phpt:1.3 php-src/ext/mysqli/tests/mysqli_constants.phpt:1.4 --- php-src/ext/mysqli/tests/mysqli_constants.phpt:1.3 Wed Oct 10 10:51:34 2007 +++ php-src/ext/mysqli/tests/mysqli_constants.phpt Tue Feb 19 15:38:24 2008 @@ -44,6 +44,8 @@ MYSQLI_TIMESTAMP_FLAG = true, MYSQLI_SET_FLAG = true, MYSQLI_NUM_FLAG = true, + MYSQLI_ENUM_FLAG = true, + MYSQLI_BINARY_FLAG= true, MYSQLI_PART_KEY_FLAG = true, MYSQLI_GROUP_FLAG = true, MYSQLI_TYPE_DECIMAL = true, @@ -90,10 +92,16 @@ $version = 50007 + 1; $expected_constants['MYSQLI_OPT_NET_CMD_BUFFER_SIZE'] = true; $expected_constants['MYSQLI_OPT_NET_READ_BUFFER_SIZE'] = true; + $expected_constants['MYSQLI_DEBUG_TRACE_ENABLED'] = true; + } else { $version = mysqli_get_client_version(); } + if (($version 51122 $version 6) || ($version 60003) || $IS_MYSQLND) { + $expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true; + } + if ($version 50002) { $expected_constants = array_merge($expected_constants, array( MYSQLI_TYPE_NEWDECIMAL= true, @@ -101,6 +109,10 @@ )); } + if ($version 50002 || $IS_MYSQLND) { + $expected_constants['MYSQLI_NO_DEFAULT_VALUE_FLAG'] = true; + } + if ($version 50003) { $expected_constants = array_merge($expected_constants, array( MYSQLI_STMT_ATTR_CURSOR_TYPE = true, http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/php_mysqlnd.c?r1=1.4r2=1.5diff_format=u Index: php-src/ext/mysqlnd/php_mysqlnd.c diff -u php-src/ext/mysqlnd/php_mysqlnd.c:1.4 php-src/ext/mysqlnd/php_mysqlnd.c:1.5 --- php-src/ext/mysqlnd/php_mysqlnd.c:1.4 Thu Feb 14 15:20:08 2008 +++ php-src/ext/mysqlnd/php_mysqlnd.c Tue Feb 19 15:38:24 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysqlnd.c,v 1.4 2008/02/14 15:20:08 andrey Exp $ */ +/* $Id: php_mysqlnd.c,v 1.5 2008/02/19 15:38:24 andrey Exp $ */ #include php.h #include php_ini.h #include mysqlnd.h @@ -226,7 +226,7 @@ mysqlnd_functions, PHP_MINIT(mysqlnd), PHP_MSHUTDOWN(mysqlnd), -#ifdef PHP_DEBUG || defined(MYSQLND_THREADED) +#if defined(PHP_DEBUG) || defined(MYSQLND_THREADED) PHP_RINIT(mysqlnd), #else NULL, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests mysqli_constants.phpt mysqli_get_connection_stats.phpt mysqli_options.phpt mysqli_phpinfo.phpt mysqli_real_connect.phpt mysqli_report.phpt mysqli_set_charset.p
uw Wed Oct 10 10:51:34 2007 UTC Modified files: /php-src/ext/mysqli/tests mysqli_set_local_infile_default.phpt mysqli_set_local_infile_handler_bad_character.phpt mysqli_set_local_infile_handler_buffer_overflow.phpt mysqli_set_local_infile_handler_closefile.phpt mysqli_set_local_infile_handler_close_link.phpt mysqli_set_local_infile_handler_kill_link.phpt mysqli_set_local_infile_handler_negative_len.phpt mysqli_set_local_infile_handler_nested_call.phpt mysqli_set_local_infile_handler_new_query.phpt mysqli_set_local_infile_handler_nofileop.phpt mysqli_set_local_infile_handler.phpt mysqli_set_local_infile_handler_replace_buffer.phpt mysqli_set_local_infile_handler_short_len.phpt mysqli_set_local_infile_handler_unregister.phpt mysqli_constants.phpt mysqli_get_connection_stats.phpt mysqli_options.phpt mysqli_phpinfo.phpt mysqli_real_connect.phpt mysqli_report.phpt mysqli_set_charset.phpt mysqli_stmt_attr_set.phpt mysqli_stmt_bind_param.phpt mysqli_stmt_bind_result_bit.phpt mysqli_stmt_bind_result.phpt mysqli_stmt_get_warnings.phpt mysqli_stmt_init.phpt mysqli_stmt_send_long_data.phpt Log: More changes = synching HEAD with 5_3 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_set_local_infile_default.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/mysqli/tests/mysqli_set_local_infile_default.phpt diff -u php-src/ext/mysqli/tests/mysqli_set_local_infile_default.phpt:1.2 php-src/ext/mysqli/tests/mysqli_set_local_infile_default.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_set_local_infile_default.phpt:1.2 Thu Aug 9 10:01:20 2007 +++ php-src/ext/mysqli/tests/mysqli_set_local_infile_default.phpt Wed Oct 10 10:51:34 2007 @@ -1,18 +1,18 @@ --TEST-- mysqli_set_local_infile_default() --SKIPIF-- -?php +?php require_once('skipif.inc'); -require_once('skipifemb.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); if (!function_exists('mysqli_set_local_infile_handler')) die(skip - function not available.); require_once('connect.inc'); -if (!$TEST_EXPERIMENTAL) - die(skip - experimental (= unsupported) feature); ? +--INI-- +mysqli.allow_local_infile=1 --FILE-- ?php require_once('connect.inc'); @@ -25,6 +25,10 @@ if (!is_null($tmp = @mysqli_set_local_infile_default($link))) printf([002] Expecting NULL got %s/%s\n, gettype($tmp), $tmp); + $link = new mysqli(); + if (!is_null($tmp = @mysqli_set_local_infile_default($link))) + printf([002a] Expecting NULL got %s/%s\n, gettype($tmp), $tmp); + include(table.inc); if (!is_null($tmp = @mysqli_set_local_infile_default($link, 'foo'))) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt diff -u php-src/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt:1.2 php-src/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt:1.2 Thu Aug 9 10:01:20 2007 +++ php-src/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt Wed Oct 10 10:51:34 2007 @@ -1,9 +1,9 @@ --TEST-- mysqli_set_local_infile_handler() - random ASCII character including \0 --SKIPIF-- -?php +?php require_once('skipif.inc'); -require_once('skipifemb.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); @@ -12,7 +12,25 @@ if (!$TEST_EXPERIMENTAL) die(skip - experimental (= unsupported) feature); + +if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) + die(skip Cannot connect to MySQL); + +if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE local_infile')) { + mysqli_close($link); + die(skip Cannot check if Server variable 'local_infile' is set to 'ON'); +} + +$row = mysqli_fetch_assoc($res); +mysqli_free_result($res); +mysqli_close($link); + +if ('ON' != $row['Value']) +