From adcfee7b07ce96272349e6a17892151a150658bb Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 23 Mar 2014 11:30:09 +0800 Subject: Refactor ext/mysql --- ext/mysql/tests/mysql_data_seek.phpt | 2 +- ext/mysql/tests/mysql_db_name.phpt | 2 +- ext/mysql/tests/mysql_errno.phpt | 2 +- ext/mysql/tests/mysql_error.phpt | 2 +- ext/mysql/tests/mysql_fetch_array.phpt | 2 +- ext/mysql/tests/mysql_fetch_assoc.phpt | 2 +- ext/mysql/tests/mysql_fetch_field.phpt | 2 +- ext/mysql/tests/mysql_fetch_lengths.phpt | 2 +- ext/mysql/tests/mysql_fetch_object.phpt | 2 +- ext/mysql/tests/mysql_fetch_row.phpt | 2 +- ext/mysql/tests/mysql_field_flags.phpt | 2 +- ext/mysql/tests/mysql_field_len.phpt | 2 +- ext/mysql/tests/mysql_field_name.phpt | 2 +- ext/mysql/tests/mysql_field_seek.phpt | 2 +- ext/mysql/tests/mysql_field_table.phpt | 2 +- ext/mysql/tests/mysql_field_type.phpt | 2 +- ext/mysql/tests/mysql_free_result.phpt | 2 +- ext/mysql/tests/mysql_insert_id.phpt | 2 +- ext/mysql/tests/mysql_num_fields.phpt | 2 +- ext/mysql/tests/mysql_num_rows.phpt | 2 +- ext/mysql/tests/mysql_ping.phpt | 2 +- ext/mysql/tests/mysql_query.phpt | 2 +- ext/mysql/tests/mysql_result.phpt | 2 +- ext/mysql/tests/mysql_select_db.phpt | 2 +- ext/mysql/tests/mysql_stat.phpt | 2 +- ext/mysql/tests/mysql_tablename.phpt | 2 +- ext/mysql/tests/mysql_thread_id.phpt | 2 +- ext/mysql/tests/mysql_unbuffered_query.phpt | 2 +- ext/mysql/tests/setupdefault.inc | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) (limited to 'ext/mysql/tests') diff --git a/ext/mysql/tests/mysql_data_seek.phpt b/ext/mysql/tests/mysql_data_seek.phpt index 72d3e63274..268e145842 100644 --- a/ext/mysql/tests/mysql_data_seek.phpt +++ b/ext/mysql/tests/mysql_data_seek.phpt @@ -75,5 +75,5 @@ Warning: mysql_data_seek(): Offset -1 is invalid for MySQL result index %d (or t Warning: mysql_data_seek(): Offset 3 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d -Warning: mysql_data_seek(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_data_seek(): supplied resource is not a valid MySQL result resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_db_name.phpt b/ext/mysql/tests/mysql_db_name.phpt index 92878e994d..9321701337 100644 --- a/ext/mysql/tests/mysql_db_name.phpt +++ b/ext/mysql/tests/mysql_db_name.phpt @@ -64,5 +64,5 @@ Warning: mysql_db_name(): Unable to jump to row -1 on MySQL result index %d in % Warning: mysql_db_name(): Unable to jump to row %d on MySQL result index %d in %s on line %d -Warning: mysql_db_name(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_db_name(): supplied resource is not a valid MySQL result resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_errno.phpt b/ext/mysql/tests/mysql_errno.phpt index c9c2956290..83aa7327bd 100644 --- a/ext/mysql/tests/mysql_errno.phpt +++ b/ext/mysql/tests/mysql_errno.phpt @@ -59,6 +59,6 @@ Deprecated: mysql_connect(): The mysql extension is deprecated and will be remov int(0) int(%d) -Warning: mysql_errno(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_errno(): supplied resource is not a valid MySQL-Link resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_error.phpt b/ext/mysql/tests/mysql_error.phpt index a2cf7e0034..82a43fb7b4 100644 --- a/ext/mysql/tests/mysql_error.phpt +++ b/ext/mysql/tests/mysql_error.phpt @@ -64,6 +64,6 @@ require_once("clean_table.inc"); --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d -Warning: mysql_error(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_error(): supplied resource is not a valid MySQL-Link resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_fetch_array.phpt b/ext/mysql/tests/mysql_fetch_array.phpt index 8ccefd0242..1b1852d932 100644 --- a/ext/mysql/tests/mysql_fetch_array.phpt +++ b/ext/mysql/tests/mysql_fetch_array.phpt @@ -357,5 +357,5 @@ array(11) { Warning: mysql_fetch_array(): The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH in %s on line %d -Warning: mysql_fetch_array(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_fetch_array(): supplied resource is not a valid MySQL result resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_fetch_assoc.phpt b/ext/mysql/tests/mysql_fetch_assoc.phpt index 048613a6be..936c7c6f23 100644 --- a/ext/mysql/tests/mysql_fetch_assoc.phpt +++ b/ext/mysql/tests/mysql_fetch_assoc.phpt @@ -87,7 +87,7 @@ array(5) { %unicode|string%(1) "1" } -Warning: mysql_fetch_assoc(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_fetch_assoc(): supplied resource is not a valid MySQL result resource in %s on line %d Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [010] diff --git a/ext/mysql/tests/mysql_fetch_field.phpt b/ext/mysql/tests/mysql_fetch_field.phpt index 85c1fd6f7e..6855fc52dc 100644 --- a/ext/mysql/tests/mysql_fetch_field.phpt +++ b/ext/mysql/tests/mysql_fetch_field.phpt @@ -217,7 +217,7 @@ bool(false) Warning: mysql_fetch_field(): Bad field offset in %s on line %d -Warning: mysql_fetch_field(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_fetch_field(): supplied resource is not a valid MySQL result resource in %s on line %d object(stdClass)#%d (13) { [%u|b%"name"]=> %unicode|string%(2) "id" diff --git a/ext/mysql/tests/mysql_fetch_lengths.phpt b/ext/mysql/tests/mysql_fetch_lengths.phpt index f0fbbb7bb8..f59833e918 100644 --- a/ext/mysql/tests/mysql_fetch_lengths.phpt +++ b/ext/mysql/tests/mysql_fetch_lengths.phpt @@ -48,6 +48,6 @@ array(2) { } bool(false) -Warning: mysql_fetch_lengths(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_fetch_lengths(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_fetch_object.phpt b/ext/mysql/tests/mysql_fetch_object.phpt index 666d0ee821..5038863458 100644 --- a/ext/mysql/tests/mysql_fetch_object.phpt +++ b/ext/mysql/tests/mysql_fetch_object.phpt @@ -147,7 +147,7 @@ bool(false) bool(false) bool(false) -Warning: mysql_fetch_object(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_fetch_object(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d diff --git a/ext/mysql/tests/mysql_fetch_row.phpt b/ext/mysql/tests/mysql_fetch_row.phpt index 0ed932e2c0..d26f7a4d82 100644 --- a/ext/mysql/tests/mysql_fetch_row.phpt +++ b/ext/mysql/tests/mysql_fetch_row.phpt @@ -52,6 +52,6 @@ array(2) { [005] bool(false) -Warning: mysql_fetch_row(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_fetch_row(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_field_flags.phpt b/ext/mysql/tests/mysql_field_flags.phpt index 5f8eb0995f..cd9e4b5671 100644 --- a/ext/mysql/tests/mysql_field_flags.phpt +++ b/ext/mysql/tests/mysql_field_flags.phpt @@ -152,6 +152,6 @@ Warning: mysql_field_flags(): Field -1 is invalid for MySQL result index %d in % Warning: mysql_field_flags(): Field 2 is invalid for MySQL result index %d in %s on line %d -Warning: mysql_field_flags(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_field_flags(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_field_len.phpt b/ext/mysql/tests/mysql_field_len.phpt index 119d352164..a7b4cabee3 100644 --- a/ext/mysql/tests/mysql_field_len.phpt +++ b/ext/mysql/tests/mysql_field_len.phpt @@ -55,6 +55,6 @@ Warning: mysql_field_len(): Field -1 is invalid for MySQL result index %d in %s Warning: mysql_field_len(): Field 2 is invalid for MySQL result index %d in %s on line %d -Warning: mysql_field_len(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_field_len(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_field_name.phpt b/ext/mysql/tests/mysql_field_name.phpt index 85f6c42d93..1ef613babe 100644 --- a/ext/mysql/tests/mysql_field_name.phpt +++ b/ext/mysql/tests/mysql_field_name.phpt @@ -55,6 +55,6 @@ Warning: mysql_field_name(): Field -1 is invalid for MySQL result index %d in %s Warning: mysql_field_name(): Field 2 is invalid for MySQL result index %d in %s on line %d -Warning: mysql_field_name(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_field_name(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_field_seek.phpt b/ext/mysql/tests/mysql_field_seek.phpt index 8487493a88..a9eab70bca 100644 --- a/ext/mysql/tests/mysql_field_seek.phpt +++ b/ext/mysql/tests/mysql_field_seek.phpt @@ -139,6 +139,6 @@ Warning: mysql_field_seek(): Field %d is invalid for MySQL result index %d in %s bool(false) bool(false) -Warning: mysql_field_seek(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_field_seek(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_field_table.phpt b/ext/mysql/tests/mysql_field_table.phpt index 826651a855..d95be96ee5 100644 --- a/ext/mysql/tests/mysql_field_table.phpt +++ b/ext/mysql/tests/mysql_field_table.phpt @@ -55,6 +55,6 @@ Warning: mysql_field_table(): Field -1 is invalid for MySQL result index %d in % Warning: mysql_field_table(): Field 2 is invalid for MySQL result index %d in %s on line %d -Warning: mysql_field_table(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_field_table(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_field_type.phpt b/ext/mysql/tests/mysql_field_type.phpt index c767cab6f1..e4b774a691 100644 --- a/ext/mysql/tests/mysql_field_type.phpt +++ b/ext/mysql/tests/mysql_field_type.phpt @@ -55,6 +55,6 @@ Warning: mysql_field_type(): Field -1 is invalid for MySQL result index %d in %s Warning: mysql_field_type(): Field 2 is invalid for MySQL result index %d in %s on line %d -Warning: mysql_field_type(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_field_type(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_free_result.phpt b/ext/mysql/tests/mysql_free_result.phpt index 90498bd59a..582297c80f 100644 --- a/ext/mysql/tests/mysql_free_result.phpt +++ b/ext/mysql/tests/mysql_free_result.phpt @@ -47,6 +47,6 @@ require_once("clean_table.inc"); Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d bool(true) -Warning: mysql_free_result(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_free_result(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_insert_id.phpt b/ext/mysql/tests/mysql_insert_id.phpt index b69a96ae9b..93319dad23 100644 --- a/ext/mysql/tests/mysql_insert_id.phpt +++ b/ext/mysql/tests/mysql_insert_id.phpt @@ -68,6 +68,6 @@ require_once("clean_table.inc"); --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d -Warning: mysql_insert_id(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_insert_id(): supplied resource is not a valid MySQL-Link resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_num_fields.phpt b/ext/mysql/tests/mysql_num_fields.phpt index 4621dc91f8..f65f8ec165 100644 --- a/ext/mysql/tests/mysql_num_fields.phpt +++ b/ext/mysql/tests/mysql_num_fields.phpt @@ -54,5 +54,5 @@ require_once("clean_table.inc"); --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d -Warning: mysql_num_fields(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_num_fields(): supplied resource is not a valid MySQL result resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_num_rows.phpt b/ext/mysql/tests/mysql_num_rows.phpt index 5a803d41f9..2b69e939be 100644 --- a/ext/mysql/tests/mysql_num_rows.phpt +++ b/ext/mysql/tests/mysql_num_rows.phpt @@ -85,5 +85,5 @@ Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in % Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in %s on line %d -Warning: mysql_num_rows(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_num_rows(): supplied resource is not a valid MySQL result resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_ping.phpt b/ext/mysql/tests/mysql_ping.phpt index 0308df3396..2f2c38cd90 100644 --- a/ext/mysql/tests/mysql_ping.phpt +++ b/ext/mysql/tests/mysql_ping.phpt @@ -47,5 +47,5 @@ bool(true) bool(true) bool(true) -Warning: mysql_ping(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_ping(): supplied resource is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_query.phpt b/ext/mysql/tests/mysql_query.phpt index 01b14ee284..80b985e099 100644 --- a/ext/mysql/tests/mysql_query.phpt +++ b/ext/mysql/tests/mysql_query.phpt @@ -124,5 +124,5 @@ array(1) { } %unicode|string%(1) "a" -Warning: mysql_query(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_query(): supplied resource is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_result.phpt b/ext/mysql/tests/mysql_result.phpt index 0a58b9b883..ae1983fe04 100644 --- a/ext/mysql/tests/mysql_result.phpt +++ b/ext/mysql/tests/mysql_result.phpt @@ -111,6 +111,6 @@ bool(false) Warning: mysql_result(): test.label not found in MySQL result index %d in %s on line %d bool(false) -Warning: mysql_result(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_result(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_select_db.phpt b/ext/mysql/tests/mysql_select_db.phpt index e9bc99aa73..6e0bf9e505 100644 --- a/ext/mysql/tests/mysql_select_db.phpt +++ b/ext/mysql/tests/mysql_select_db.phpt @@ -70,5 +70,5 @@ Deprecated: mysql_connect(): The mysql extension is deprecated and will be remov %unicode|string%(%d) "%s" bool(false) -Warning: mysql_select_db(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_select_db(): supplied resource is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_stat.phpt b/ext/mysql/tests/mysql_stat.phpt index d6a34df581..ef5bb45105 100644 --- a/ext/mysql/tests/mysql_stat.phpt +++ b/ext/mysql/tests/mysql_stat.phpt @@ -46,5 +46,5 @@ print "done!"; --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d -Warning: mysql_stat(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_stat(): supplied resource is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_tablename.phpt b/ext/mysql/tests/mysql_tablename.phpt index 4bbe54d443..76007fde46 100644 --- a/ext/mysql/tests/mysql_tablename.phpt +++ b/ext/mysql/tests/mysql_tablename.phpt @@ -51,6 +51,6 @@ Warning: mysql_tablename(): Unable to jump to row -1 on MySQL result index %d in Warning: mysql_tablename(): Unable to jump to row 2 on MySQL result index %d in %s on line %d -Warning: mysql_tablename(): %d is not a valid MySQL result resource in %s on line %d +Warning: mysql_tablename(): supplied resource is not a valid MySQL result resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_thread_id.phpt b/ext/mysql/tests/mysql_thread_id.phpt index aa95d31944..a2e0f934c2 100644 --- a/ext/mysql/tests/mysql_thread_id.phpt +++ b/ext/mysql/tests/mysql_thread_id.phpt @@ -37,5 +37,5 @@ print "done!"; --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d -Warning: mysql_thread_id(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_thread_id(): supplied resource is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_unbuffered_query.phpt b/ext/mysql/tests/mysql_unbuffered_query.phpt index 8754b58b59..5b10cc41d9 100644 --- a/ext/mysql/tests/mysql_unbuffered_query.phpt +++ b/ext/mysql/tests/mysql_unbuffered_query.phpt @@ -118,5 +118,5 @@ int(0) Notice: mysql_close(): Function called without first fetching all rows from a previous unbuffered query in %s on line %d -Warning: mysql_unbuffered_query(): %d is not a valid MySQL-Link resource in %s on line %d +Warning: mysql_unbuffered_query(): supplied resource is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/setupdefault.inc b/ext/mysql/tests/setupdefault.inc index 6d25c20840..b13402ec14 100644 --- a/ext/mysql/tests/setupdefault.inc +++ b/ext/mysql/tests/setupdefault.inc @@ -3,7 +3,7 @@ // copy variables from connect.inc into mysql default connection ini settings, so that implicit mysql_connect() behaviour can be tested where needed // must be loaded AFTER connect.inc -ini_set('mysql.default_host', $host); +ini_set('mysql.default_host', $host . ":" . $port); ini_set('mysql.default_user', $user); ini_set('mysql.default_password', $passwd); -- cgit v1.2.1 From 7caf93a785b596a0ec66b262860e37414023836a Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 24 Mar 2014 13:45:18 +0800 Subject: Fixed tests (mysqlnd only) --- ext/mysql/tests/bug55473.phpt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/mysql/tests') diff --git a/ext/mysql/tests/bug55473.phpt b/ext/mysql/tests/bug55473.phpt index 98fd0091dc..7d149dc6fd 100644 --- a/ext/mysql/tests/bug55473.phpt +++ b/ext/mysql/tests/bug55473.phpt @@ -8,6 +8,9 @@ if (defined('PHP_WINDOWS_VERSION_MAJOR')) { die("skip Test doesn't work on Windows"); } +if (!$IS_MYSQLND) + die("skip mysqlnd only, libmysql does not warning about server gone away"); + if (!($output = @exec("lsof -np " . getmypid()))) die("skip Test can't find command line tool lsof"); ?> -- cgit v1.2.1 From 2056359594cbaeeb38d13a73f54cfaba52b17475 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 15 Apr 2014 01:27:21 +0400 Subject: Fixed test (support for MarinaDB) --- ext/mysql/tests/mysql_trace_mode.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysql/tests') diff --git a/ext/mysql/tests/mysql_trace_mode.phpt b/ext/mysql/tests/mysql_trace_mode.phpt index 7655975d70..73872de1db 100644 --- a/ext/mysql/tests/mysql_trace_mode.phpt +++ b/ext/mysql/tests/mysql_trace_mode.phpt @@ -31,7 +31,7 @@ require_once("clean_table.inc"); --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d I don\'t mind character sets, do I?\n -Warning: mysql_query(): 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 'BOGUS_SQL' at line 1 in %s on line %d +Warning: mysql_query(): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BOGUS_SQL' at line 1 in %s on line %d done! Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in %s on line %d -- cgit v1.2.1 From e3de409eac95870cc0323f3e4df32a0435658333 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 15 Aug 2014 13:08:53 +0400 Subject: Fixed PHP6 unicode related tests --- ext/mysql/tests/mysql_client_encoding.phpt | 4 +++- ext/mysql/tests/mysql_db_name.phpt | 3 ++- ext/mysql/tests/mysql_db_query.phpt | 8 ++++++-- ext/mysql/tests/mysql_error.phpt | 4 +++- ext/mysql/tests/mysql_field_flags.phpt | 4 +++- ext/mysql/tests/mysql_get_client_info.phpt | 4 +++- ext/mysql/tests/mysql_get_host_info.phpt | 4 +++- ext/mysql/tests/mysql_get_server_info.phpt | 4 +++- ext/mysql/tests/mysql_info.phpt | 4 +++- ext/mysql/tests/mysql_list_dbs.phpt | 4 +++- ext/mysql/tests/mysql_list_processes.phpt | 8 ++++++-- ext/mysql/tests/mysql_query.phpt | 8 ++++++-- ext/mysql/tests/mysql_stat.phpt | 4 +++- ext/mysql/tests/mysql_unbuffered_query.phpt | 8 ++++++-- 14 files changed, 53 insertions(+), 18 deletions(-) (limited to 'ext/mysql/tests') diff --git a/ext/mysql/tests/mysql_client_encoding.phpt b/ext/mysql/tests/mysql_client_encoding.phpt index 5b21765ddb..c10303b55a 100644 --- a/ext/mysql/tests/mysql_client_encoding.phpt +++ b/ext/mysql/tests/mysql_client_encoding.phpt @@ -50,7 +50,9 @@ if ($link_enc !== $tmp['charset']) { } } -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && function_exists('is_unicode')) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + function_exists('is_unicode')) { // unicode mode if (!is_unicode($default_link_enc) || !is_unicode($link_enc)) { printf("[010] No unicode returned!\n"); diff --git a/ext/mysql/tests/mysql_db_name.phpt b/ext/mysql/tests/mysql_db_name.phpt index 9321701337..ba8334aaff 100644 --- a/ext/mysql/tests/mysql_db_name.phpt +++ b/ext/mysql/tests/mysql_db_name.phpt @@ -34,7 +34,8 @@ if (false !== ($tmp = mysql_db_name($res, $num + 1))) printf("[006] Expecting boolean/false, got %s/%s. [%d] %s\n", gettype($tmp), $tmp, mysql_errno($link), mysql_error($link)); -$unicode = (boolean)(version_compare(PHP_VERSION, '5.9.9', '>') == 1); +$unicode = (boolean)(version_compare(PHP_VERSION, '5.9.9', '>') == 1 && + version_compare(PHP_VERSION, '6.9.9', '<=') == 1); for ($i = 0; $i < $num; $i++) { if ('' === ($dbname = mysql_db_name($res, $i))) printf("[%03d] Got empty database name! [%d] %s\n", diff --git a/ext/mysql/tests/mysql_db_query.phpt b/ext/mysql/tests/mysql_db_query.phpt index 291fbfaac6..dc556f449e 100644 --- a/ext/mysql/tests/mysql_db_query.phpt +++ b/ext/mysql/tests/mysql_db_query.phpt @@ -32,7 +32,9 @@ $row = mysql_fetch_assoc($res); if (1 != $row['id']) printf("[005] Expecting record 1/a, got record %s/%s\n", $row['id'], $row['label']); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row['label'])) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($row['label'])) { printf("[006] No unicode returned! [%d] %s\n", mysql_errno($link), mysql_error($link)); var_inspect($row); } @@ -47,7 +49,9 @@ $row = mysql_fetch_assoc($res); if (1 != $row['id']) printf("[008] Expecting record 1/a, got record %s/%s\n", $row['id'], $row['label']); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row['label'])) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($row['label'])) { printf("[009] No unicode returned! [%d] %s\n", mysql_errno(), mysql_error()); var_inspect($row); } diff --git a/ext/mysql/tests/mysql_error.phpt b/ext/mysql/tests/mysql_error.phpt index 82a43fb7b4..9b0729d0c0 100644 --- a/ext/mysql/tests/mysql_error.phpt +++ b/ext/mysql/tests/mysql_error.phpt @@ -39,7 +39,9 @@ $tmp = mysql_error($link); if (!is_string($tmp) || !preg_match("/Table '\w*\.test' doesn't exist/su", $tmp)) printf("[006] Expecting string/[Table... doesn't exit], got %s/%s. [%d] %s\n", gettype($tmp), $tmp, mysql_errno($link), mysql_error($link)); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp)) { printf("[007] Expecting Unicode error message!\n"); var_inspect($tmp); } diff --git a/ext/mysql/tests/mysql_field_flags.phpt b/ext/mysql/tests/mysql_field_flags.phpt index cd9e4b5671..bf2a193f57 100644 --- a/ext/mysql/tests/mysql_field_flags.phpt +++ b/ext/mysql/tests/mysql_field_flags.phpt @@ -32,7 +32,9 @@ if (false !== ($tmp = mysql_field_flags($res, -1))) if (!is_string($tmp = mysql_field_flags($res, 0)) || empty($tmp)) printf("[006] Expecting non empty string, got %s/%s\n", gettype($tmp), $tmp); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp)) { printf("[007] Check the unicode support!\n"); var_inspect($tmp); } diff --git a/ext/mysql/tests/mysql_get_client_info.phpt b/ext/mysql/tests/mysql_get_client_info.phpt index 95de0ad5ed..6e84628476 100644 --- a/ext/mysql/tests/mysql_get_client_info.phpt +++ b/ext/mysql/tests/mysql_get_client_info.phpt @@ -8,7 +8,9 @@ include "connect.inc"; if (!is_string($info = mysql_get_client_info()) || ('' === $info)) printf("[001] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($info)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($info)) { printf("[002] Expecting Unicode!\n"); var_inspect($info); } diff --git a/ext/mysql/tests/mysql_get_host_info.phpt b/ext/mysql/tests/mysql_get_host_info.phpt index 4b21ddbb41..a98ab5be35 100644 --- a/ext/mysql/tests/mysql_get_host_info.phpt +++ b/ext/mysql/tests/mysql_get_host_info.phpt @@ -25,7 +25,9 @@ if ($def_info !== $info) { var_dump($info); } -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($info)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($info)) { printf("[005] Expecting Unicode error message!\n"); var_inspect($info); } diff --git a/ext/mysql/tests/mysql_get_server_info.phpt b/ext/mysql/tests/mysql_get_server_info.phpt index ad192e4722..e29222b966 100644 --- a/ext/mysql/tests/mysql_get_server_info.phpt +++ b/ext/mysql/tests/mysql_get_server_info.phpt @@ -25,7 +25,9 @@ if ($def_info !== $info) { var_dump($info); } -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($info)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($info)) { printf("[005] Expecting Unicode error message!\n"); var_inspect($info); } diff --git a/ext/mysql/tests/mysql_info.phpt b/ext/mysql/tests/mysql_info.phpt index c478679042..82c680768b 100644 --- a/ext/mysql/tests/mysql_info.phpt +++ b/ext/mysql/tests/mysql_info.phpt @@ -46,7 +46,9 @@ if (!$res = mysql_query("UPDATE test SET label = 'b' WHERE id >= 100", $link)) if (!is_string($tmp = mysql_info($link)) || ('' == $tmp)) printf("[012] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp)) { printf("[013] Expecting Unicode!\n"); var_inspect($info); } diff --git a/ext/mysql/tests/mysql_list_dbs.phpt b/ext/mysql/tests/mysql_list_dbs.phpt index 402161aa63..559b5a05d9 100644 --- a/ext/mysql/tests/mysql_list_dbs.phpt +++ b/ext/mysql/tests/mysql_list_dbs.phpt @@ -27,7 +27,9 @@ if (!$num = mysql_num_rows($res)) printf("[004] Empty database list? [%d] %s\n", mysql_errno($link), mysql_error($link)); $row = mysql_fetch_array($res, MYSQL_NUM); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($row[0])) { printf("[005] Check for unicode support\n"); var_inspect($row); } diff --git a/ext/mysql/tests/mysql_list_processes.phpt b/ext/mysql/tests/mysql_list_processes.phpt index 7838a6f98a..402a10d995 100644 --- a/ext/mysql/tests/mysql_list_processes.phpt +++ b/ext/mysql/tests/mysql_list_processes.phpt @@ -24,7 +24,9 @@ if (!$num = mysql_num_rows($res)) printf("[003] Empty process list? [%d] %s\n", mysql_errno($link), mysql_error($link)); $row = mysql_fetch_array($res, MYSQL_NUM); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($row[0])) { printf("[004] Check for unicode support\n"); var_inspect($row); } @@ -38,7 +40,9 @@ if (!$num = mysql_num_rows($res)) printf("[006] Empty process list? [%d] %s\n", mysql_errno(), mysql_error()); $row = mysql_fetch_array($res, MYSQL_NUM); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($row[0])) { printf("[007] Check for unicode support\n"); var_inspect($row); } diff --git a/ext/mysql/tests/mysql_query.phpt b/ext/mysql/tests/mysql_query.phpt index 80b985e099..abe7adb88c 100644 --- a/ext/mysql/tests/mysql_query.phpt +++ b/ext/mysql/tests/mysql_query.phpt @@ -58,7 +58,9 @@ if (mysql_query('DROP PROCEDURE IF EXISTS p', $link)) { printf("[009] Result seems wrong, dumping\n"); var_dump($tmp); } - if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['p_version'])) { + if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp['p_version'])) { printf("[010] Expecting unicode string, dumping\n"); var_dump($tmp); } @@ -75,7 +77,9 @@ if (mysql_query('DROP PROCEDURE IF EXISTS p', $link)) { printf("[012] Result seems wrong, dumping\n"); var_dump($tmp); } - if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['f_version'])) { + if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp['f_version'])) { printf("[013] Expecting unicode string, dumping\n"); var_dump($tmp); } diff --git a/ext/mysql/tests/mysql_stat.phpt b/ext/mysql/tests/mysql_stat.phpt index ef5bb45105..95868b7b90 100644 --- a/ext/mysql/tests/mysql_stat.phpt +++ b/ext/mysql/tests/mysql_stat.phpt @@ -25,7 +25,9 @@ if ((!is_string($stat = mysql_stat($link))) || ('' === $stat)) printf("[003] Expecting non empty string, got %s/'%s', [%d] %s\n", gettype($stat), $stat, mysql_errno($link), mysql_error($link)); -if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($stat)) { +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($stat)) { printf("[004] Expecting Unicode error message!\n"); var_inspect($stat); } diff --git a/ext/mysql/tests/mysql_unbuffered_query.phpt b/ext/mysql/tests/mysql_unbuffered_query.phpt index 5b10cc41d9..8c3c2d6e10 100644 --- a/ext/mysql/tests/mysql_unbuffered_query.phpt +++ b/ext/mysql/tests/mysql_unbuffered_query.phpt @@ -48,7 +48,9 @@ if (mysql_unbuffered_query('DROP PROCEDURE IF EXISTS p', $link)) { printf("[008] Result seems wrong, dumping\n"); var_dump($tmp); } - if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['p_version'])) { + if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp['p_version'])) { printf("[009] Expecting unicode string, dumping\n"); var_dump($tmp); } @@ -65,7 +67,9 @@ if (mysql_unbuffered_query('DROP PROCEDURE IF EXISTS p', $link)) { printf("[011] Result seems wrong, dumping\n"); var_dump($tmp); } - if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['f_version'])) { + if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && + (version_compare(PHP_VERSION, '6.9.9', '<=') == 1) && + !is_unicode($tmp['f_version'])) { printf("[012] Expecting unicode string, dumping\n"); var_dump($tmp); } -- cgit v1.2.1