From c01b505a44a353ea79adc3762382037d8f6a6638 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Thu, 24 Sep 2009 12:51:03 +0000 Subject: [PATCH] Proxying as many connect calls as possible to make testing of the compression protocol @ mysqlnd easier. By setting the environment variable MYSQL_TEST_COMPRESS you can tell the tests to set the MYSQLI_CLIENT_COMPRESS flag upon connect. --- ext/mysqli/tests/001.phpt | 16 +++--- ext/mysqli/tests/002.phpt | 4 +- ext/mysqli/tests/003.phpt | 4 +- ext/mysqli/tests/004.phpt | 4 +- ext/mysqli/tests/005.phpt | 4 +- ext/mysqli/tests/006.phpt | 4 +- ext/mysqli/tests/007.phpt | 4 +- ext/mysqli/tests/008.phpt | 4 +- ext/mysqli/tests/009.phpt | 4 +- ext/mysqli/tests/010.phpt | 4 +- ext/mysqli/tests/011.phpt | 4 +- ext/mysqli/tests/012.phpt | 4 +- ext/mysqli/tests/013.phpt | 4 +- ext/mysqli/tests/014.phpt | 4 +- ext/mysqli/tests/015.phpt | 4 +- ext/mysqli/tests/016.phpt | 2 +- ext/mysqli/tests/017.phpt | 2 +- ext/mysqli/tests/018.phpt | 6 +-- ext/mysqli/tests/019.phpt | 4 +- ext/mysqli/tests/020.phpt | 4 +- ext/mysqli/tests/021.phpt | 4 +- ext/mysqli/tests/022.phpt | 4 +- ext/mysqli/tests/023.phpt | 4 +- ext/mysqli/tests/024.phpt | 4 +- ext/mysqli/tests/025.phpt | 4 +- ext/mysqli/tests/026.phpt | 4 +- ext/mysqli/tests/027.phpt | 6 +-- ext/mysqli/tests/028.phpt | 2 +- ext/mysqli/tests/029.phpt | 4 +- ext/mysqli/tests/030.phpt | 2 +- ext/mysqli/tests/031.phpt | 2 +- ext/mysqli/tests/032.phpt | 4 +- ext/mysqli/tests/033.phpt | 2 +- ext/mysqli/tests/034.phpt | 6 +-- ext/mysqli/tests/035.phpt | 6 +-- ext/mysqli/tests/036.phpt | 4 +- ext/mysqli/tests/037.phpt | 4 +- ext/mysqli/tests/038.phpt | 4 +- ext/mysqli/tests/039.phpt | 2 +- ext/mysqli/tests/040.phpt | 4 +- ext/mysqli/tests/041.phpt | 4 +- ext/mysqli/tests/042.phpt | 4 +- ext/mysqli/tests/043.phpt | 4 +- ext/mysqli/tests/044.phpt | 6 +-- ext/mysqli/tests/045.phpt | 4 +- ext/mysqli/tests/046.phpt | 4 +- ext/mysqli/tests/047.phpt | 4 +- ext/mysqli/tests/048.phpt | 4 +- ext/mysqli/tests/049.phpt | 4 +- ext/mysqli/tests/050.phpt | 6 +-- ext/mysqli/tests/051.phpt | 6 +-- ext/mysqli/tests/052.phpt | 10 ++-- ext/mysqli/tests/053.phpt | 12 ++--- ext/mysqli/tests/054.phpt | 12 ++--- ext/mysqli/tests/055.phpt | 12 ++--- ext/mysqli/tests/057.phpt | 4 +- ext/mysqli/tests/058.phpt | 4 +- ext/mysqli/tests/059.phpt | 4 +- ext/mysqli/tests/060.phpt | 4 +- ext/mysqli/tests/061.phpt | 4 +- ext/mysqli/tests/062.phpt | 2 +- ext/mysqli/tests/063.phpt | 2 +- ext/mysqli/tests/064.phpt | 8 +-- ext/mysqli/tests/065.phpt | 2 +- ext/mysqli/tests/066.phpt | 4 +- ext/mysqli/tests/067.phpt | 6 +-- ext/mysqli/tests/069.phpt | 2 +- ext/mysqli/tests/070.phpt | 6 +-- ext/mysqli/tests/071.phpt | 8 +-- ext/mysqli/tests/072.phpt | 2 +- ext/mysqli/tests/074.phpt | 2 +- ext/mysqli/tests/bug31668.phpt | 4 +- ext/mysqli/tests/bug32405.phpt | 4 +- ext/mysqli/tests/bug33090.phpt | 8 +-- ext/mysqli/tests/bug34785.phpt | 6 +-- ext/mysqli/tests/bug34810.phpt | 6 +-- ext/mysqli/tests/bug35103.phpt | 4 +- ext/mysqli/tests/bug35517.phpt | 4 +- ext/mysqli/tests/bug35759.phpt | 2 +- ext/mysqli/tests/bug36420.phpt | 8 +-- ext/mysqli/tests/bug36745.phpt | 4 +- ext/mysqli/tests/bug36802.phpt | 11 ++-- ext/mysqli/tests/bug36949.phpt | 2 +- ext/mysqli/tests/bug37090.phpt | 2 +- ext/mysqli/tests/bug38710.phpt | 8 +-- ext/mysqli/tests/bug42378.phpt | 2 +- ext/mysqli/tests/bug42548.phpt | 4 +- ext/mysqli/tests/bug44897.phpt | 4 +- ext/mysqli/tests/bug47050.phpt | 2 +- ext/mysqli/tests/bug48909.phpt | 2 +- ext/mysqli/tests/bug49027.phpt | 4 +- ext/mysqli/tests/bug49442.phpt | 4 +- ext/mysqli/tests/clean_table.inc | 2 +- ext/mysqli/tests/connect.inc | 52 +++++++++++++++++++ ext/mysqli/tests/mysqli_affected_rows.phpt | 2 +- ext/mysqli/tests/mysqli_affected_rows_oo.phpt | 2 +- ext/mysqli/tests/mysqli_autocommit.phpt | 4 +- ext/mysqli/tests/mysqli_autocommit_oo.phpt | 4 +- ext/mysqli/tests/mysqli_change_user.phpt | 4 +- .../tests/mysqli_change_user_get_lock.phpt | 2 +- .../tests/mysqli_change_user_insert_id.phpt | 4 +- .../mysqli_change_user_locks_temporary.phpt | 2 +- ext/mysqli/tests/mysqli_change_user_oo.phpt | 2 +- ...ysqli_change_user_prepared_statements.phpt | 2 +- .../tests/mysqli_change_user_rollback.phpt | 2 +- .../tests/mysqli_change_user_set_names.phpt | 4 +- ext/mysqli/tests/mysqli_character_set.phpt | 2 +- .../tests/mysqli_character_set_name.phpt | 6 +-- .../tests/mysqli_character_set_name_oo.phpt | 4 +- .../tests/mysqli_class_mysqli_interface.phpt | 4 +- .../mysqli_class_mysqli_result_interface.phpt | 4 +- .../mysqli_class_mysqli_stmt_interface.phpt | 2 +- .../tests/mysqli_class_mysqli_warning.phpt | 4 +- ext/mysqli/tests/mysqli_close.phpt | 8 +-- ext/mysqli/tests/mysqli_close_oo.phpt | 8 +-- ext/mysqli/tests/mysqli_commit.phpt | 4 +- ext/mysqli/tests/mysqli_commit_oo.phpt | 4 +- ext/mysqli/tests/mysqli_connect_errno.phpt | 10 ++-- ext/mysqli/tests/mysqli_connect_error.phpt | 10 ++-- .../tests/mysqli_connect_oo_warnings.phpt | 6 +-- ext/mysqli/tests/mysqli_connect_twice.phpt | 6 +-- .../mysqli_disable_reads_from_master.phpt | 2 +- ext/mysqli/tests/mysqli_driver.phpt | 6 +-- ext/mysqli/tests/mysqli_dump_debug_info.phpt | 2 +- .../mysqli_enable_reads_from_master.phpt | 6 +-- ext/mysqli/tests/mysqli_errno.phpt | 2 +- ext/mysqli/tests/mysqli_error.phpt | 6 +-- ext/mysqli/tests/mysqli_fetch_all_oo.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_array_oo.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt | 2 +- .../tests/mysqli_fetch_field_direct_oo.phpt | 2 +- .../tests/mysqli_fetch_field_flags.phpt | 4 +- ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 2 +- ext/mysqli/tests/mysqli_fork.phpt | 12 ++--- ext/mysqli/tests/mysqli_get_client_stats.phpt | 4 +- .../mysqli_get_connection_stats_off.phpt | 4 +- ext/mysqli/tests/mysqli_get_warnings.phpt | 10 ++-- .../tests/mysqli_insert_id_variation.phpt | 4 +- ext/mysqli/tests/mysqli_kill.phpt | 4 +- ext/mysqli/tests/mysqli_max_links.phpt | 2 +- .../tests/mysqli_mysqlnd_read_timeout.phpt | 2 +- .../mysqli_mysqlnd_read_timeout_long.phpt | 2 +- .../mysqli_mysqlnd_read_timeout_zero.phpt | 2 +- ext/mysqli/tests/mysqli_no_reconnect.phpt | 4 +- .../tests/mysqli_options_init_command.phpt | 8 +-- .../tests/mysqli_options_openbasedir.phpt | 2 +- ext/mysqli/tests/mysqli_pconn_disabled.phpt | 8 +-- ext/mysqli/tests/mysqli_pconn_kill.phpt | 6 +-- ext/mysqli/tests/mysqli_pconn_limits.phpt | 8 +-- ext/mysqli/tests/mysqli_pconn_max_links.phpt | 16 +++--- ext/mysqli/tests/mysqli_pconn_reuse.phpt | 6 +-- ext/mysqli/tests/mysqli_pconnect.phpt | 8 +-- ext/mysqli/tests/mysqli_ping.phpt | 4 +- ext/mysqli/tests/mysqli_poll.phpt | 2 +- ext/mysqli/tests/mysqli_poll_kill.phpt | 2 +- .../mysqli_poll_mixing_insert_select.phpt | 4 +- ext/mysqli/tests/mysqli_poll_reference.phpt | 4 +- ext/mysqli/tests/mysqli_prepare.phpt | 2 +- .../tests/mysqli_prepare_no_object.phpt | 2 +- ext/mysqli/tests/mysqli_query.phpt | 2 +- .../mysqli_query_local_infile_large.phpt | 4 +- .../tests/mysqli_query_stored_proc.phpt | 4 +- ext/mysqli/tests/mysqli_reconnect.phpt | 2 +- ext/mysqli/tests/mysqli_report.phpt | 18 +++---- ext/mysqli/tests/mysqli_report_wo_ps.phpt | 4 +- .../tests/mysqli_result_references.phpt | 2 +- .../tests/mysqli_result_unclonable.phpt | 6 +-- ext/mysqli/tests/mysqli_rollback.phpt | 4 +- ext/mysqli/tests/mysqli_select_db.phpt | 6 +-- ext/mysqli/tests/mysqli_send_query.phpt | 2 +- ext/mysqli/tests/mysqli_set_charset.phpt | 4 +- .../mysqli_set_local_infile_handler.phpt | 2 +- ...et_local_infile_handler_bad_character.phpt | 2 +- ..._local_infile_handler_buffer_overflow.phpt | 2 +- ...i_set_local_infile_handler_close_link.phpt | 2 +- ...li_set_local_infile_handler_closefile.phpt | 2 +- ...qli_set_local_infile_handler_closures.phpt | 2 +- ...li_set_local_infile_handler_kill_link.phpt | 2 +- ...set_local_infile_handler_negative_len.phpt | 2 +- ..._set_local_infile_handler_nested_call.phpt | 2 +- ...li_set_local_infile_handler_new_query.phpt | 2 +- ...qli_set_local_infile_handler_nofileop.phpt | 2 +- ..._set_local_infile_handler_openbasedir.phpt | 2 +- ...t_local_infile_handler_replace_buffer.phpt | 2 +- ...li_set_local_infile_handler_short_len.phpt | 2 +- ...i_set_local_infile_handler_unregister.phpt | 2 +- ext/mysqli/tests/mysqli_set_opt.phpt | 6 +-- ext/mysqli/tests/mysqli_ssl_set.phpt | 8 +-- .../tests/mysqli_stmt_affected_rows.phpt | 2 +- .../tests/mysqli_stmt_bind_result_bit.phpt | 4 +- .../tests/mysqli_stmt_bind_result_format.phpt | 2 +- .../tests/mysqli_stmt_datatype_change.phpt | 6 +-- .../mysqli_stmt_execute_stored_proc.phpt | 4 +- ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt | 2 +- .../tests/mysqli_stmt_get_result_bit.phpt | 2 +- .../tests/mysqli_stmt_get_result_geom.phpt | 2 +- .../tests/mysqli_stmt_get_result_types.phpt | 2 +- .../tests/mysqli_stmt_store_result.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_unclonable.phpt | 2 +- ext/mysqli/tests/mysqli_unclonable.phpt | 2 +- .../tests/mysqli_warning_unclonable.phpt | 2 +- ext/mysqli/tests/skipifconnectfailure.inc | 2 +- ext/mysqli/tests/table.inc | 2 +- 206 files changed, 478 insertions(+), 429 deletions(-) diff --git a/ext/mysqli/tests/001.phpt b/ext/mysqli/tests/001.phpt index 77f3dcbd18..4e19d81090 100644 --- a/ext/mysqli/tests/001.phpt +++ b/ext/mysqli/tests/001.phpt @@ -1,8 +1,8 @@ --TEST-- mysqli connect --SKIPIF-- - @@ -13,25 +13,25 @@ require_once('skipifconnectfailure.inc'); $test = ""; /*** test mysqli_connect localhost:port ***/ - $link = mysqli_connect($host, $user, $passwd, "", $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, "", $port, $socket); $test .= ($link) ? "1" : "0"; mysqli_close($link); /*** test mysqli_real_connect ***/ $link = mysqli_init(); - $test.= (mysqli_real_connect($link, $host, $user, $passwd, "", $port, $socket) ) + $test.= (my_mysqli_real_connect($link, $host, $user, $passwd, "", $port, $socket) ) ? "1" : "0"; mysqli_close($link); /*** test mysqli_real_connect with db ***/ $link = mysqli_init(); - $test .= (mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) + $test .= (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) ? "1" : "0"; mysqli_close($link); /*** test mysqli_real_connect with port ***/ $link = mysqli_init(); - $test .= (mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) + $test .= (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) ? "1":"0"; mysqli_close($link); @@ -40,7 +40,7 @@ require_once('skipifconnectfailure.inc'); if (!$link = mysqli_init()) printf("[001 + %d] mysqli_init() failed, [%d] %s\n", $i, mysqli_connect_errno(), mysqli_connect_error()); - if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) + if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) printf("[002 + %d] mysqli_real_connect() failed, [%d] %s\n", $i, mysqli_connect_errno(), mysqli_connect_error()); mysqli_close($link); @@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc'); /*** test mysqli_real_connect compressed ***/ /* $link = mysqli_init(); - $test .= (mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_COMPRESS)) + $test .= (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_COMPRESS)) ? "1" : "0"; mysqli_close($link); */ diff --git a/ext/mysqli/tests/002.phpt b/ext/mysqli/tests/002.phpt index 680f0f4fc3..6bbdecfdcc 100644 --- a/ext/mysqli/tests/002.phpt +++ b/ext/mysqli/tests/002.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null")) @@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- --FILE-- @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); if (!mysqli_query($link, "SET AUTOCOMMIT=0")) printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); diff --git a/ext/mysqli/tests/019.phpt b/ext/mysqli/tests/019.phpt index d603320099..f3741a5d32 100644 --- a/ext/mysqli/tests/019.phpt +++ b/ext/mysqli/tests/019.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); if (!mysqli_query($link, "DROP TABLE IF EXISTS insert_read")) printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); @@ -58,7 +58,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- --FILE-- @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $status = mysqli_stat($link); diff --git a/ext/mysqli/tests/028.phpt b/ext/mysqli/tests/028.phpt index a518b7dad7..6c4425e2b4 100644 --- a/ext/mysqli/tests/028.phpt +++ b/ext/mysqli/tests/028.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $cset = substr(mysqli_character_set_name($link),0,6); diff --git a/ext/mysqli/tests/029.phpt b/ext/mysqli/tests/029.phpt index 9ec3bae362..bfc54bcc61 100644 --- a/ext/mysqli/tests/029.phpt +++ b/ext/mysqli/tests/029.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); mysqli_select_db($link, $db); @@ -29,7 +29,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- @@ -11,7 +11,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $pinfo = mysqli_get_proto_info($link); diff --git a/ext/mysqli/tests/035.phpt b/ext/mysqli/tests/035.phpt index 58f0246dfb..7b621aa222 100644 --- a/ext/mysqli/tests/035.phpt +++ b/ext/mysqli/tests/035.phpt @@ -1,8 +1,8 @@ --TEST-- function test: mysqli_get_server_info --SKIPIF-- - --FILE-- @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $sinfo = substr(mysqli_get_server_info($link),0,1); diff --git a/ext/mysqli/tests/036.phpt b/ext/mysqli/tests/036.phpt index a118cdf463..4e68b6c2a1 100644 --- a/ext/mysqli/tests/036.phpt +++ b/ext/mysqli/tests/036.phpt @@ -14,7 +14,7 @@ function test: mysqli_insert_id() include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); mysqli_select_db($link, $db); @@ -45,7 +45,7 @@ function test: mysqli_insert_id() --CLEAN-- --FILE-- @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $i = mysqli_get_server_version($link); diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt index bae2ce8e2c..d5ee5ad2bc 100644 --- a/ext/mysqli/tests/045.phpt +++ b/ext/mysqli/tests/045.phpt @@ -7,7 +7,7 @@ mysqli_bind_result (SHOW) require_once('skipifconnectfailure.inc'); include "connect.inc"; - $link = mysqli_connect($host, $user, $passwd); + $link = my_mysqli_connect($host, $user, $passwd); $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'"); mysqli_execute($stmt); @@ -23,7 +23,7 @@ mysqli_bind_result (SHOW) include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'"); mysqli_execute($stmt); diff --git a/ext/mysqli/tests/046.phpt b/ext/mysqli/tests/046.phpt index 8e8991a40d..cf77392101 100644 --- a/ext/mysqli/tests/046.phpt +++ b/ext/mysqli/tests/046.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); mysqli_select_db($link, $db); @@ -37,7 +37,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- select_db($db); $mysql->query("DROP TABLE IF EXISTS test_fetch_null"); @@ -43,7 +43,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- select_db($db); $result = $mysql->query("SELECT DATABASE()"); @@ -19,6 +19,8 @@ require_once('skipifconnectfailure.inc'); $result->close(); var_dump($row); + if ($row[0] != $db) + printf("[001] Expecting '%s' got '%s'\n", $db, $row[0]); $mysql->close(); print "done!"; diff --git a/ext/mysqli/tests/050.phpt b/ext/mysqli/tests/050.phpt index ee1c20322e..ba668f0a84 100644 --- a/ext/mysqli/tests/050.phpt +++ b/ext/mysqli/tests/050.phpt @@ -1,8 +1,8 @@ --TEST-- non freed statement test --SKIPIF-- - --FILE-- @@ -12,7 +12,7 @@ require_once('skipifconnectfailure.inc'); /************************ * non freed stamement ************************/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $stmt = mysqli_prepare($link, "SELECT CURRENT_USER()"); mysqli_execute($stmt); diff --git a/ext/mysqli/tests/051.phpt b/ext/mysqli/tests/051.phpt index 8ff75d59bf..82665156db 100644 --- a/ext/mysqli/tests/051.phpt +++ b/ext/mysqli/tests/051.phpt @@ -1,8 +1,8 @@ --TEST-- free statement after close --SKIPIF-- - --FILE-- @@ -12,7 +12,7 @@ require_once('skipifconnectfailure.inc'); /************************ * free statement after close ************************/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $stmt1 = mysqli_prepare($link, "SELECT CURRENT_USER()"); mysqli_execute($stmt1); diff --git a/ext/mysqli/tests/052.phpt b/ext/mysqli/tests/052.phpt index 95fdc2f27c..f280d84061 100644 --- a/ext/mysqli/tests/052.phpt +++ b/ext/mysqli/tests/052.phpt @@ -1,18 +1,18 @@ --TEST-- call statement after close --SKIPIF-- - --FILE-- --FILE-- --FILE-- --FILE-- real_query("SELECT 'foo' FROM DUAL"); diff --git a/ext/mysqli/tests/063.phpt b/ext/mysqli/tests/063.phpt index fbbdacd598..9b42ab7fbf 100644 --- a/ext/mysqli/tests/063.phpt +++ b/ext/mysqli/tests/063.phpt @@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc'); execute(); diff --git a/ext/mysqli/tests/064.phpt b/ext/mysqli/tests/064.phpt index 729fb6b45f..a308e4ab29 100644 --- a/ext/mysqli/tests/064.phpt +++ b/ext/mysqli/tests/064.phpt @@ -1,15 +1,15 @@ --TEST-- -NULL binding +NULL binding --SKIPIF-- - --FILE-- execute(); diff --git a/ext/mysqli/tests/065.phpt b/ext/mysqli/tests/065.phpt index 9819f26132..d0f1d16291 100644 --- a/ext/mysqli/tests/065.phpt +++ b/ext/mysqli/tests/065.phpt @@ -16,7 +16,7 @@ if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) { query("DROP TABLE IF EXISTS test_warnings"); @@ -31,7 +31,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- multi_query('SELECT 1;SELECT 2'); do { $res = $mysql->store_result(); diff --git a/ext/mysqli/tests/070.phpt b/ext/mysqli/tests/070.phpt index 3064ac11e7..eee5125133 100644 --- a/ext/mysqli/tests/070.phpt +++ b/ext/mysqli/tests/070.phpt @@ -1,15 +1,15 @@ --TEST-- mysqli ping --SKIPIF-- - --FILE-- ping()); $mysql->close(); print "done!"; diff --git a/ext/mysqli/tests/071.phpt b/ext/mysqli/tests/071.phpt index e2fcaf18ae..8888fb1706 100644 --- a/ext/mysqli/tests/071.phpt +++ b/ext/mysqli/tests/071.phpt @@ -1,8 +1,8 @@ --TEST-- mysqli thread_id & kill --SKIPIF-- - @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); ping()); @@ -20,7 +20,7 @@ require_once('skipifconnectfailure.inc'); $mysql->close(); - $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); var_dump(mysqli_ping($mysql)); diff --git a/ext/mysqli/tests/072.phpt b/ext/mysqli/tests/072.phpt index db05d5d227..637014b29c 100644 --- a/ext/mysqli/tests/072.phpt +++ b/ext/mysqli/tests/072.phpt @@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc'); query("DROP TABLE IF EXISTS not_exists"); diff --git a/ext/mysqli/tests/074.phpt b/ext/mysqli/tests/074.phpt index 0d935d35d1..883655bc5e 100644 --- a/ext/mysqli/tests/074.phpt +++ b/ext/mysqli/tests/074.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include "connect.inc"; - $mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); var_dump($mysqli->autocommit(false)); $result = $mysqli->query("SELECT @@autocommit"); diff --git a/ext/mysqli/tests/bug31668.phpt b/ext/mysqli/tests/bug31668.phpt index b9a9589558..cdca551f21 100644 --- a/ext/mysqli/tests/bug31668.phpt +++ b/ext/mysqli/tests/bug31668.phpt @@ -11,7 +11,7 @@ error_reporting = E_ALL & ~E_STRICT multi_query('SELECT 1;SELECT 2'); do { $res = $mysql->store_result(); @@ -25,7 +25,7 @@ error_reporting = E_ALL & ~E_STRICT var_dump($mysql->error, __LINE__); $mysql->close(); - $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); $mysql->multi_query('SELECT 1;SELECT 2'); do { $res = $mysql->store_result(); diff --git a/ext/mysqli/tests/bug32405.phpt b/ext/mysqli/tests/bug32405.phpt index a6e4d19a8d..24bcdb4d0f 100644 --- a/ext/mysqli/tests/bug32405.phpt +++ b/ext/mysqli/tests/bug32405.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include ("connect.inc"); /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); mysqli_select_db($link, "test"); mysqli_query($link, "SET sql_mode=''"); @@ -34,7 +34,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- --FILE-- @@ -10,13 +10,13 @@ require_once('skipifconnectfailure.inc'); include ("connect.inc"); /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, null, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, null, $port, $socket); mysqli_select_db($link, $db); if (!($link->prepare("this makes no sense"))) { printf("%d\n", $link->errno); printf("%s\n", $link->sqlstate); - } + } $link->close(); ?> --EXPECT-- diff --git a/ext/mysqli/tests/bug34785.phpt b/ext/mysqli/tests/bug34785.phpt index 2130ccaf3a..18dd4c3566 100644 --- a/ext/mysqli/tests/bug34785.phpt +++ b/ext/mysqli/tests/bug34785.phpt @@ -1,8 +1,8 @@ --TEST-- Bug #34785 (Can not properly subclass mysqli_stmt) --SKIPIF-- - --FILE-- @@ -24,7 +24,7 @@ require_once('skipifconnectfailure.inc'); } /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); mysqli_query($link, "SET sql_mode=''"); $stmt = new my_stmt($link, "SELECT 'foo' FROM DUAL"); diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index e1a6ca30c9..fac805312a 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -12,14 +12,14 @@ class DbConnection { public function connect() { include "connect.inc"; - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); var_dump($link); $link = mysqli_init(); /* @ is to supress 'Property access is not allowed yet' */ @var_dump($link); - $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); $mysql->query("DROP TABLE IF EXISTS test_warnings"); $mysql->query("CREATE TABLE test_warnings (a int not null)"); $mysql->query("SET sql_mode=''"); @@ -36,7 +36,7 @@ echo "Done\n"; --CLEAN-- 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)"); @@ -54,7 +54,7 @@ EOSQL; --CLEAN-- query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)"); $mysql->query("INSERT INTO temp (id) VALUES (3000000897),(3800001532),(3900002281),(3100059612)"); @@ -40,7 +40,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- num_rows after calling result->close()) --SKIPIF-- - --FILE-- query('select 1'); @@ -21,7 +21,7 @@ echo $result->num_rows; echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: main(): Couldn't fetch mysqli_result in %s on line %d Warning: main(): Couldn't fetch mysqli_result in %s on line %d diff --git a/ext/mysqli/tests/bug36745.phpt b/ext/mysqli/tests/bug36745.phpt index c1f2a11ab5..511eaf38fd 100644 --- a/ext/mysqli/tests/bug36745.phpt +++ b/ext/mysqli/tests/bug36745.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); include ("connect.inc"); /*** test mysqli_connect 127.0.0.1 ***/ - $mysql = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $mysql->query("DROP TABLE IF EXISTS litest"); $mysql->query("CREATE TABLE litest (a VARCHAR(20))"); @@ -24,7 +24,7 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- --FILE-- query("SELECT 'foo' FROM DUAL"); - /* following operations should work */ + /* following operations should work */ $x[2] = ($mysql->client_version > 0); $x[3] = $mysql->errno; $mysql->close(); - - var_dump($x); ?> diff --git a/ext/mysqli/tests/bug36949.phpt b/ext/mysqli/tests/bug36949.phpt index 10aaad5ccd..39909f9efd 100644 --- a/ext/mysqli/tests/bug36949.phpt +++ b/ext/mysqli/tests/bug36949.phpt @@ -50,7 +50,7 @@ $B = new B(); --CLEAN-- ') == 1)) { set_charset("latin1"); diff --git a/ext/mysqli/tests/bug38710.phpt b/ext/mysqli/tests/bug38710.phpt index 490810cbc7..280a51a6fc 100755 --- a/ext/mysqli/tests/bug38710.phpt +++ b/ext/mysqli/tests/bug38710.phpt @@ -1,15 +1,15 @@ --TEST-- Bug #38710 (data leakage because of nonexisting boundary checking in statements) --SKIPIF-- - --FILE-- stmt_init(); $qry->prepare("SELECT REPEAT('a',100000)"); $qry->execute(); @@ -20,5 +20,5 @@ if ($text !== str_repeat('a', ($IS_MYSQLND || mysqli_get_server_version($db) > 5 } echo "Done"; ?> ---EXPECTF-- +--EXPECTF-- Done \ No newline at end of file diff --git a/ext/mysqli/tests/bug42378.phpt b/ext/mysqli/tests/bug42378.phpt index 1667eb47d0..b3fd7ca524 100644 --- a/ext/mysqli/tests/bug42378.phpt +++ b/ext/mysqli/tests/bug42378.phpt @@ -152,7 +152,7 @@ memory_limit=83886080 return true; } - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect - [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); diff --git a/ext/mysqli/tests/bug42548.phpt b/ext/mysqli/tests/bug42548.phpt index 418de89d9a..c9950be3a1 100644 --- a/ext/mysqli/tests/bug42548.phpt +++ b/ext/mysqli/tests/bug42548.phpt @@ -5,7 +5,7 @@ Bug #42548 PROCEDURE xxx can't return a result set in the given context (works i require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error())); } if (mysqli_get_server_version($link) <= 50000) { @@ -53,7 +53,7 @@ print "done!"; --CLEAN-- query("SELECT 'test'", MYSQLI_ASYNC); diff --git a/ext/mysqli/tests/bug48909.phpt b/ext/mysqli/tests/bug48909.phpt index dbdbe5c6a7..55c85a6860 100644 --- a/ext/mysqli/tests/bug48909.phpt +++ b/ext/mysqli/tests/bug48909.phpt @@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc'); use global default, false -> no compression, true -> compression + */ + function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $compress = -1) { + global $test_compress; + + if (-1 == $compress) + $compress = $test_compress; + + if ($compress) { + $link = mysqli_init(); + mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, 0 & MYSQLI_CLIENT_COMPRESS); + } else { + $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + } + + return $link; + } + + /** + * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible + * + * @param compress mixed: -1 => use global default, false -> no compression, true -> compression + */ + function my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags = 0, $compress = -1) { + global $test_compress; + + if (-1 == $compress) + $compress = $test_compress; + + return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags & MYSQLI_CLIENT_COMPRESS); + } + + class my_mysqli extends mysqli { + public function __construct($host, $user, $passwd, $db, $port, $socket, $compress = -1) { + global $test_compress; + + if (-1 == $compress) + $compress = $test_compress; + + if ($compress) { + parent::init(); + $this->real_connect($host, $user, $passwd, $db, $port, $socket, 0 & MYSQLI_CLIENT_COMPRESS); + } else { + parent::__construct($host, $user, $passwd, $db, $port, $socket); + } + } + } ?> \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_affected_rows.phpt b/ext/mysqli/tests/mysqli_affected_rows.phpt index a09ed22742..6cb5451c0b 100644 --- a/ext/mysqli/tests/mysqli_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows.phpt @@ -22,7 +22,7 @@ mysqli_affected_rows() if (!is_null($tmp = @mysqli_affected_rows($link, $link))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt index 9fbce3eb01..07b7bcb486 100644 --- a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt @@ -14,7 +14,7 @@ mysqli->affected_rows if (NULL !== ($tmp = @$mysqli->affected_rows)) printf("[000a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) { + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); } diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt index d94e0dbbe3..cdd5559767 100644 --- a/ext/mysqli/tests/mysqli_autocommit.phpt +++ b/ext/mysqli/tests/mysqli_autocommit.phpt @@ -7,7 +7,7 @@ mysqli_autocommit() require_once('connect.inc'); require_once('skipifconnectfailure.inc'); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket)); } @@ -40,7 +40,7 @@ mysqli_autocommit() if (!is_null($tmp = @mysqli_autocommit($link, $link, $link))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); } diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt index a0c5f1f8d4..8f2c4b472f 100644 --- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt +++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt @@ -7,7 +7,7 @@ mysqli->autocommit() require_once('skipifconnectfailure.inc'); require_once('connect.inc'); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) { + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { printf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); exit(1); @@ -31,7 +31,7 @@ mysqli->autocommit() @@ -28,7 +28,7 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysqli_change_user($link, $link, $link, $link, $link))) printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_change_user_get_lock.phpt b/ext/mysqli/tests/mysqli_change_user_get_lock.phpt index 8ca387ab39..4cc071d7ab 100644 --- a/ext/mysqli/tests/mysqli_change_user_get_lock.phpt +++ b/ext/mysqli/tests/mysqli_change_user_get_lock.phpt @@ -70,7 +70,7 @@ sleep(5); /* Ok, let's try a NEW connection and a NEW lock! */ mysqli_close($link); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[010] Cannot open new connection, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); diff --git a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt index b3235092a0..83efb51492 100644 --- a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt @@ -7,7 +7,7 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); if (!$IS_MYSQLND) { - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Can't test server version, might hit known bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184"); if (mysqli_get_client_version($link) <= 50135) /* TODO - check wich version got the patch */ @@ -20,7 +20,7 @@ if (!$IS_MYSQLND) { ') == 1) { $tmp = NULL; $link = NULL; - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_character_set_name.phpt b/ext/mysqli/tests/mysqli_character_set_name.phpt index 03bc31159e..9a40099fe1 100644 --- a/ext/mysqli/tests/mysqli_character_set_name.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name.phpt @@ -1,8 +1,8 @@ --TEST-- mysqli_chararcter_set_name(), mysql_client_encoding() [alias] --SKIPIF-- - @@ -23,7 +23,7 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysqli_character_set_name($link, $link, $link))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[005] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt index 018a90ad8c..a56cf6ae8d 100644 --- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt @@ -1,7 +1,7 @@ --TEST-- mysqli_chararcter_set_name(), mysql_client_encoding() [alias] --SKIPIF-- -unknown = $unknown; printf("setting mysqli->unknown, mysqli_unknown = '%s'\n", @$mysqli->unknown); - $mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); printf("\nAccess hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):\n"); assert(mysqli_connect_error() === $mysqli->connect_error); printf("mysqli->connect_error = '%s'/%s ('%s'/%s)\n", diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt index de4fb87ca4..b327fe656c 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt @@ -11,11 +11,11 @@ require_once('skipifconnectfailure.inc'); require('connect.inc'); require('table.inc'); - $mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); $mysqli_result = $mysqli->query('SELECT * FROM test'); $row = $mysqli_result->fetch_row(); - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $res = mysqli_query($link, 'SELECT * FROM test'); assert(mysqli_fetch_row($res) === $row); diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt index 45cc38a704..9ddb26e89e 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt @@ -11,7 +11,7 @@ Interface of the class mysqli_stmt require('connect.inc'); require('table.inc'); - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); $stmt = new mysqli_stmt($link); printf("Parent class:\n"); diff --git a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt index c1d6687181..62f01cac6a 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt @@ -21,7 +21,7 @@ if (!$TEST_EXPERIMENTAL) $mysqli = new mysqli(); $warning = new mysqli_warning($mysqli); - $mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); $stmt = new mysqli_stmt($mysqli); $warning = new mysqli_warning($stmt); @@ -32,7 +32,7 @@ if (!$TEST_EXPERIMENTAL) $warning = new mysqli_warning($obj); include("table.inc"); - $mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); $res = $mysqli->query('INSERT INTO test(id, label) VALUES (1, "zz")'); $warning = mysqli_get_warnings($mysqli); diff --git a/ext/mysqli/tests/mysqli_close.phpt b/ext/mysqli/tests/mysqli_close.phpt index 24e4a35c98..713c6e157e 100644 --- a/ext/mysqli/tests/mysqli_close.phpt +++ b/ext/mysqli/tests/mysqli_close.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_close() --SKIPIF-- - --FILE-- @@ -19,7 +19,7 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysqli_close($link, $link))) printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_close_oo.phpt b/ext/mysqli/tests/mysqli_close_oo.phpt index 706767458a..c3d6a93974 100644 --- a/ext/mysqli/tests/mysqli_close_oo.phpt +++ b/ext/mysqli/tests/mysqli_close_oo.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_close() --SKIPIF-- - --FILE-- @@ -13,7 +13,7 @@ require_once('skipifconnectfailure.inc'); $tmp = NULL; $link = NULL; - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt index 1aecd16e48..6a3c1e86c9 100644 --- a/ext/mysqli/tests/mysqli_commit.phpt +++ b/ext/mysqli/tests/mysqli_commit.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); -if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket)); } @@ -39,7 +39,7 @@ if ($row[1] == "DISABLED" || $row[1] == "NO") { if (!is_null($tmp = @mysqli_commit($link, $link))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index d302e38cee..8d072999cb 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -5,7 +5,7 @@ mysqli_commit() require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); -if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) { +if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket)); } @@ -33,7 +33,7 @@ if ($row[1] == "DISABLED" || $row[1] == "NO") { if (!is_null($tmp = @$mysqli->commit())) printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_connect_errno.phpt b/ext/mysqli/tests/mysqli_connect_errno.phpt index f1b1d7b01a..068f10d7aa 100644 --- a/ext/mysqli/tests/mysqli_connect_errno.phpt +++ b/ext/mysqli/tests/mysqli_connect_errno.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_connect_errno() --SKIPIF-- - --FILE-- @@ -17,7 +17,7 @@ require_once('skipifconnectfailure.inc'); if (0 !== ($tmp = @mysqli_connect_errno($link))) printf("[001] Expecting integer/0, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -26,7 +26,7 @@ require_once('skipifconnectfailure.inc'); mysqli_close($link); - $link = @mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket); + $link = @my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket); if (false !== $link) printf("[004] Connect to the server should fail using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s, expecting boolean/false, got %s/%s\n", $host, $user . 'unknown_really', $db, $port, $socket, gettype($link), $link); diff --git a/ext/mysqli/tests/mysqli_connect_error.phpt b/ext/mysqli/tests/mysqli_connect_error.phpt index 5016acf247..e65dc0eb07 100644 --- a/ext/mysqli/tests/mysqli_connect_error.phpt +++ b/ext/mysqli/tests/mysqli_connect_error.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_connect_error() --SKIPIF-- - --FILE-- @@ -17,7 +17,7 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysqli_connect_error($link))) printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -26,7 +26,7 @@ require_once('skipifconnectfailure.inc'); mysqli_close($link); - if ($link = @mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) + if ($link = @my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) printf("[003] Connect to the server should fail using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", $host, $user . 'unknown_really', $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt index 1c2defc8b0..af36ad8846 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt @@ -28,12 +28,12 @@ new mysqli() var_dump(mysqli_connect_errno()); print "3) bail\n"; - if (false !== ($link = mysqli_connect($myhost))) { + if (false !== ($link = my_mysqli_connect($myhost))) { printf("[003] Expecting boolean/false, got %s/%s\n", gettype($link), $link); } print "4) be quiet\n"; - if (false !== ($link = @mysqli_connect($myhost))) { + if (false !== ($link = @my_mysqli_connect($myhost))) { printf("[004] Expecting boolean/false, got %s/%s\n", gettype($link), $link); } var_dump(mysqli_connect_error()); @@ -50,7 +50,7 @@ Warning: mysqli::mysqli(): (HY000/200%d): %s int(200%d) 3) bail -Warning: mysqli_connect(): (HY000/200%d): %s +Warning: my_mysqli_connect(): (HY000/200%d): %s 4) be quiet %s(%d) "%s" int(200%d) diff --git a/ext/mysqli/tests/mysqli_connect_twice.phpt b/ext/mysqli/tests/mysqli_connect_twice.phpt index debc435b0e..7c6a726b29 100644 --- a/ext/mysqli/tests/mysqli_connect_twice.phpt +++ b/ext/mysqli/tests/mysqli_connect_twice.phpt @@ -10,14 +10,14 @@ require_once('skipifconnectfailure.inc'); report_mode = MYSQLI_REPORT_OFF; - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[016] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); mysqli_query($link, "NO_SQL"); mysqli_close($link); $driver->report_mode = MYSQLI_REPORT_ERROR; - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[017] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); mysqli_query($link, "NO_SQL"); mysqli_close($link); diff --git a/ext/mysqli/tests/mysqli_dump_debug_info.phpt b/ext/mysqli/tests/mysqli_dump_debug_info.phpt index d93738edc8..fe253e1cf7 100644 --- a/ext/mysqli/tests/mysqli_dump_debug_info.phpt +++ b/ext/mysqli/tests/mysqli_dump_debug_info.phpt @@ -19,7 +19,7 @@ require_once('skipifconnectfailure.inc'); if (NULL !== ($tmp = @mysqli_dump_debug_info($link))) printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); exit(1); diff --git a/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt b/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt index 2228f3d6c5..171ed56505 100644 --- a/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt +++ b/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt @@ -1,8 +1,8 @@ --TEST-- mysqli_enable_reads_from_master() --SKIPIF-- - @@ -19,7 +19,7 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysqli_error($link))) printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); } diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt index 9d3032cbb9..297d92ac7d 100644 --- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt @@ -18,7 +18,7 @@ if (!function_exists('mysqli_fetch_all')) $mysqli = new mysqli(); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index e8b2618f70..fcabb59030 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -14,7 +14,7 @@ require_once('skipifconnectfailure.inc'); $link = NULL; require('table.inc'); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt index 9bbc802c23..d9bdcfad37 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt @@ -34,7 +34,7 @@ mysqli_fetch_assoc() - BIT return $bin; } - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt index 5106bb7e84..e9a746ec01 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt @@ -20,7 +20,7 @@ require_once('skipifconnectfailure.inc'); printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index 81328e621b..f1075139e3 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -20,7 +20,7 @@ require_once('skipifconnectfailure.inc'); require('table.inc'); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt index 6c0a9a51e0..6f1cea20c4 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt @@ -7,7 +7,7 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error())); if (mysqli_get_server_version($link) < 50041) @@ -101,7 +101,7 @@ mysqli_close($link); return array($expected_flags, $unexpected_flags, $found_flags); } - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); foreach ($columns as $column_def => $expected_flags) { diff --git a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt index d5422dccac..ef7d7622fd 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc'); query("DROP TABLE IF EXISTS t1")) @@ -103,7 +103,7 @@ if (!$TEST_EXPERIMENTAL) printf("[026] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); /* Yes, I really want to check if the object property is empty */ - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[027] Cannot create mysqli object: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); $warning = new mysqli_warning($mysqli); @@ -113,7 +113,7 @@ if (!$TEST_EXPERIMENTAL) if ('' != ($tmp = $warning->message)) printf("[029] Expecting string/empty, got %s/%s\n", gettype($tmp), $tmp); - if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) + if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[030] Cannot create mysqli object: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); if (!$mysqli->query("DROP TABLE IF EXISTS t1")) @@ -145,7 +145,7 @@ if (!$TEST_EXPERIMENTAL) ?> --EXPECTF-- -Warning: mysqli_connect(): Persistent connections are disabled. Downgrading to normal in %s on line %d +Warning: my_mysqli_connect(): Persistent connections are disabled. Downgrading to normal in %s on line %d -Warning: mysqli_connect(): Persistent connections are disabled. Downgrading to normal in %s on line %d +Warning: my_mysqli_connect(): Persistent connections are disabled. Downgrading to normal in %s on line %d Connecction 1 - SELECT @pcondisabled -> 'Connection 1' Connecction 2 - SELECT @pcondisabled -> '' done! \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_pconn_kill.phpt b/ext/mysqli/tests/mysqli_pconn_kill.phpt index 01c37e309a..297dd4cb63 100755 --- a/ext/mysqli/tests/mysqli_pconn_kill.phpt +++ b/ext/mysqli/tests/mysqli_pconn_kill.phpt @@ -18,7 +18,7 @@ mysqli.max_persistent=2 require_once("table.inc"); $host = 'p:' . $host; - if (!$plink = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$plink = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -66,7 +66,7 @@ mysqli.max_persistent=2 // On PHP side this should do nothing. PHP should not try to close the connection or something. @mysqli_close($plink); - if (!$plink = @mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$plink = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[011] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); if (!$res3 = @mysqli_query($plink, 'SELECT id FROM test ORDER BY id LIMIT 1')) { @@ -79,7 +79,7 @@ mysqli.max_persistent=2 // remove the "p:" from the host variable $host = substr($host, 2); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[013] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); if (!$res4 = mysqli_query($link, 'SELECT id FROM test ORDER BY id LIMIT 1')) diff --git a/ext/mysqli/tests/mysqli_pconn_limits.phpt b/ext/mysqli/tests/mysqli_pconn_limits.phpt index 13beb69fbf..84cd11e599 100644 --- a/ext/mysqli/tests/mysqli_pconn_limits.phpt +++ b/ext/mysqli/tests/mysqli_pconn_limits.phpt @@ -28,7 +28,7 @@ mysqli.max_links=-1 mysqli_free_result($res); printf("Regular connection 1 - '%s'\n", $row['_desc']); - if (!$link2 = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link2 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot open second regular connection, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); @@ -41,7 +41,7 @@ mysqli.max_links=-1 printf("Regular connection 2 - '%s'\n", $row['_desc']); $host = 'p:' . $host; - if (!$plink = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$plink = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[004] Cannot create persistent connection using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s, [%d] %s\n", $host, $user, $db, $port, $socket, mysqli_connect_errno(), mysqli_connect_error()); @@ -54,7 +54,7 @@ mysqli.max_links=-1 mysqli_free_result($res); printf("Persistent connection 1 - '%s'\n", $row['_desc']); - if (!$plink2 = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$plink2 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[006] Cannot create persistent connection using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s, [%d] %s\n", $host, $user, $db, $port, $socket, mysqli_connect_errno(), mysqli_connect_error()); @@ -68,7 +68,7 @@ mysqli.max_links=-1 printf("Persistent connection 2 - '%s'\n", $row['_desc']); $plink3 = mysqli_init(); - if (!mysqli_real_connect($plink3, $host, $user, $passwd, $db, $port, $socket)) + if (!my_mysqli_real_connect($plink3, $host, $user, $passwd, $db, $port, $socket)) printf("[008] Cannot create persistent connection using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s, [%d] %s\n", $host, $user, $db, $port, $socket, mysqli_connect_errno(), mysqli_connect_error()); diff --git a/ext/mysqli/tests/mysqli_pconn_max_links.phpt b/ext/mysqli/tests/mysqli_pconn_max_links.phpt index a6cb0ed8d5..3ccb761360 100644 --- a/ext/mysqli/tests/mysqli_pconn_max_links.phpt +++ b/ext/mysqli/tests/mysqli_pconn_max_links.phpt @@ -11,7 +11,7 @@ Persistent connections and mysqli.max_links die("skip mysqlnd only test"); // we need a second DB user to test for a possible flaw in the ext/mysql[i] code - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die(sprintf("skip Cannot connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); mysqli_query($link, 'DROP USER pcontest'); @@ -36,7 +36,7 @@ Persistent connections and mysqli.max_links die("skip GRANT failed"); } - if (!($link_pcontest = @mysqli_connect($host, 'pcontest', 'pcontest', $db, $port, $socket))) { + if (!($link_pcontest = @my_mysqli_connect($host, 'pcontest', 'pcontest', $db, $port, $socket))) { mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest'); mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest@localhost'); mysqli_query($link, 'DROP USER pcontest@localhost'); @@ -54,7 +54,7 @@ mysqli.max_persistent=2 require_once("connect.inc"); require_once('table.inc'); - if (!$plink = mysqli_connect('p:' . $host, 'pcontest', 'pcontest', $db, $port, $socket)) + if (!$plink = my_mysqli_connect('p:' . $host, 'pcontest', 'pcontest', $db, $port, $socket)) printf("[001] Cannot connect using the second DB user created during SKIPIF, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); @@ -107,7 +107,7 @@ mysqli.max_persistent=2 printf("[009] Persistent connection has not been killed\n"); // this fails and we have 0 (<= $num_plinks) connections - if ($plink = @mysqli_connect('p:' . $host, 'pcontest', 'pcontest', $db, $port, $socket)) + if ($plink = @my_mysqli_connect('p:' . $host, 'pcontest', 'pcontest', $db, $port, $socket)) printf("[010] Can connect using the old password, [%d] %s\n", mysqli_connect_errno($link), mysqli_connect_error($link)); @@ -123,7 +123,7 @@ mysqli.max_persistent=2 if ($num_plinks_kill > $num_plinks) printf("[011] Expecting Active Persistent Links < %d, got %d\n", $num_plinks, $num_plinks_kill); - if (!$plink = mysqli_connect('p:' . $host, 'pcontest', 'newpass', $db, $port, $socket)) + if (!$plink = my_mysqli_connect('p:' . $host, 'pcontest', 'newpass', $db, $port, $socket)) printf("[012] Cannot connect using the new password, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); @@ -137,7 +137,7 @@ mysqli.max_persistent=2 mysqli_free_result($res); var_dump($row); - if ($plink2 = mysqli_connect('p:' . $host, 'pcontest', 'newpass', $db, $port, $socket)) + if ($plink2 = my_mysqli_connect('p:' . $host, 'pcontest', 'newpass', $db, $port, $socket)) printf("[015] Can open more persistent connections than allowed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); @@ -161,7 +161,7 @@ mysqli.max_persistent=2 --CLEAN-- --FILE-- diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt index 93e3b210bf..c691835f32 100644 --- a/ext/mysqli/tests/mysqli_poll.phpt +++ b/ext/mysqli/tests/mysqli_poll.phpt @@ -17,7 +17,7 @@ if (!$IS_MYSQLND) function get_connection() { global $host, $user, $passwd, $db, $port, $socket; - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); return $link; } diff --git a/ext/mysqli/tests/mysqli_poll_kill.phpt b/ext/mysqli/tests/mysqli_poll_kill.phpt index 2b31ef7b99..73382b7301 100644 --- a/ext/mysqli/tests/mysqli_poll_kill.phpt +++ b/ext/mysqli/tests/mysqli_poll_kill.phpt @@ -17,7 +17,7 @@ if (!$IS_MYSQLND) function get_connection() { global $host, $user, $passwd, $db, $port, $socket; - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); return $link; } diff --git a/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt b/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt index d95a7b41ba..56f9182f48 100644 --- a/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt +++ b/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt @@ -17,7 +17,7 @@ if (!$IS_MYSQLND) function get_connection() { global $host, $user, $passwd, $db, $port, $socket; - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); return $link; } @@ -156,7 +156,7 @@ if (!$IS_MYSQLND) --CLEAN-- ?"); @@ -105,7 +105,7 @@ require_once('skipifconnectfailure.inc'); // Check mysqli_report(MYSQLI_REPORT_OFF); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[010] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); $stmt = mysqli_stmt_init($link); mysqli_stmt_prepare($stmt, "FOO"); @@ -118,7 +118,7 @@ require_once('skipifconnectfailure.inc'); mysqli_stmt_close($stmt); mysqli_close($link); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[011] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); $stmt = mysqli_stmt_init($link); mysqli_stmt_prepare($stmt, "SELECT id FROM test WHERE id > ?"); @@ -139,8 +139,8 @@ require_once('skipifconnectfailure.inc'); already tested php_mysqli_throw_sql_exception() -> - mysqli_real_connect() - mysqli_connect() + my_mysqli_real_connect() + my_mysqli_connect() can't be tested: mysqli_query() via mysql_use_result()/mysql_store_result() */ @@ -149,7 +149,7 @@ require_once('skipifconnectfailure.inc'); try { - if ($link = mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) + if ($link = my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) printf("[012] Can connect to the server using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", $host, $user . 'unknown_really', $db, $port, $socket); mysqli_close($link); @@ -162,7 +162,7 @@ require_once('skipifconnectfailure.inc'); if (!$link = mysqli_init()) printf("[014] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); - if ($link = mysqli_real_connect($link, $host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) + if ($link = my_mysqli_real_connect($link, $host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) printf("[015] Can connect to the server using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", $host, $user . 'unknown_really', $db, $port, $socket); mysqli_close($link); @@ -191,7 +191,7 @@ require_once('skipifconnectfailure.inc'); mysqli_report(MYSQLI_REPORT_OFF); mysqli_report(MYSQLI_REPORT_INDEX); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[017] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); // this might cause a warning - no index used @@ -235,7 +235,7 @@ require_once('skipifconnectfailure.inc'); // mysqli_use_result(), mysqli_thread_safe(), mysqli_thread_id() mysqli_report(MYSQLI_REPORT_OFF); mysqli_close($link); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[024] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); if (!$stmt = mysqli_stmt_init($link)) diff --git a/ext/mysqli/tests/mysqli_report_wo_ps.phpt b/ext/mysqli/tests/mysqli_report_wo_ps.phpt index f4b8fd9c17..08909264a7 100644 --- a/ext/mysqli/tests/mysqli_report_wo_ps.phpt +++ b/ext/mysqli/tests/mysqli_report_wo_ps.phpt @@ -69,7 +69,7 @@ require_once('skipifconnectfailure.inc'); try { - if ($link = mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) + if ($link = my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) printf("[010] Can connect to the server using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", $host, $user . 'unknown_really', $db, $port, $socket); mysqli_close($link); @@ -82,7 +82,7 @@ require_once('skipifconnectfailure.inc'); if (!$link = mysqli_init()) printf("[012] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); - if ($link = mysqli_real_connect($link, $host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) + if ($link = my_mysqli_real_connect($link, $host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) printf("[013] Can connect to the server using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", $host, $user . 'unknown_really', $db, $port, $socket); mysqli_close($link); diff --git a/ext/mysqli/tests/mysqli_result_references.phpt b/ext/mysqli/tests/mysqli_result_references.phpt index ea1f276b1a..b6bce0d981 100644 --- a/ext/mysqli/tests/mysqli_result_references.phpt +++ b/ext/mysqli/tests/mysqli_result_references.phpt @@ -39,7 +39,7 @@ require_once('skipifconnectfailure.inc'); mysqli_free_result($res); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt index 93cf663219..dfde9a78c5 100644 --- a/ext/mysqli/tests/mysqli_result_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt @@ -1,16 +1,16 @@ --TEST-- Trying to clone mysqli_result object --SKIPIF-- - --FILE-- --FILE-- @@ -19,7 +19,7 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysqli_select_db($link))) printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_send_query.phpt b/ext/mysqli/tests/mysqli_send_query.phpt index ccddfd2339..53cf25093e 100755 --- a/ext/mysqli/tests/mysqli_send_query.phpt +++ b/ext/mysqli/tests/mysqli_send_query.phpt @@ -26,7 +26,7 @@ if (!$TEST_EXPERIMENTAL) if (NULL !== ($tmp = @mysqli_send_query($link))) printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); } diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt index 27ec10f209..baf97bd3d3 100644 --- a/ext/mysqli/tests/mysqli_set_charset.phpt +++ b/ext/mysqli/tests/mysqli_set_charset.phpt @@ -14,7 +14,7 @@ if (!function_exists('mysqli_set_charset')) die("skip Function not available"); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); if (!($res = mysqli_query($link, 'SELECT version() AS server_version')) || @@ -84,7 +84,7 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR printf("[011] Expecting boolean/false because of invalid character set, got %s/%s\n", gettype($ret), $ret); mysqli_close($link); - if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[012] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt index 929587dafa..5cb1459d85 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt @@ -10,7 +10,7 @@ if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt index ddcfdc8b87..ec097fe2b6 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt @@ -13,7 +13,7 @@ if (!function_exists('mysqli_set_local_infile_handler')) if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt index bcc60d7721..03f4288825 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt index 8f06630e5c..cb8162db70 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt index 71d768f290..7498e64f43 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt index 1732a1c9d1..7e24458890 100755 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt index 1aa2878dd3..3757b61d95 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt @@ -10,7 +10,7 @@ if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt index eb39a91735..30a3bcc035 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt index d822e0a52b..465dcdb9d6 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt index 464519d0f8..5ea82e93f2 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt index 3912f52788..6354630c08 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt index 1d75d5ae82..c30f6ea916 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt @@ -10,7 +10,7 @@ if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt index caee2be429..cde8f4b129 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt index 7d781d6c9e..a793ac6623 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt @@ -13,7 +13,7 @@ require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) die("skip - experimental (= unsupported) feature"); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt index 38b3c00bef..c89fc2152c 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt @@ -10,7 +10,7 @@ if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); require_once('connect.inc'); -if (!$link = mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { diff --git a/ext/mysqli/tests/mysqli_set_opt.phpt b/ext/mysqli/tests/mysqli_set_opt.phpt index d5c41827c3..21aacd25ff 100644 --- a/ext/mysqli/tests/mysqli_set_opt.phpt +++ b/ext/mysqli/tests/mysqli_set_opt.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_set_opt() --SKIPIF-- - --FILE-- @@ -36,7 +36,7 @@ require_once('skipifconnectfailure.inc'); var_dump(mysqli_set_opt($link, MYSQLI_OPT_CONNECT_TIMEOUT, 10)); var_dump(mysqli_set_opt($link, MYSQLI_OPT_LOCAL_INFILE, 1)); var_dump(mysqli_set_opt($link, MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0')); - var_dump(mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)); + var_dump(my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)); var_dump(mysqli_set_opt($link, MYSQLI_READ_DEFAULT_GROUP, 'extra_my.cnf')); var_dump(mysqli_set_opt($link, MYSQLI_READ_DEFAULT_FILE, 'extra_my.cnf')); var_dump(mysqli_set_opt($link, MYSQLI_OPT_CONNECT_TIMEOUT, 10)); diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt index c53cdf1384..e868f34f19 100644 --- a/ext/mysqli/tests/mysqli_ssl_set.phpt +++ b/ext/mysqli/tests/mysqli_ssl_set.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_ssl_set() - test is a stub! --SKIPIF-- -') == 1) ? 'unicode' : 'string'; diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt index 4802a98ff6..ee0bf83a84 100644 --- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt @@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc'); !mysqli_stmt_execute($stmt)) printf("[008] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); - if (!$link_buf = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + if (!$link_buf = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[009] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); if (!$stmt_buf = mysqli_stmt_init($link_buf)) diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt index 5aa93b146b..edddbea948 100644 --- a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt @@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc');