summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2010-03-09 11:57:54 +0100
committerOndřej Surý <ondrej@sury.org>2010-03-09 11:57:54 +0100
commit855a09f4eded707941180c9d90acd17c25e29447 (patch)
treea40947efaa9876f31b6ee3956c3f3775768143bb /ext/mysqli/tests
parentc852c28a88fccf6e34a2cb091fdfa72bce2b59c7 (diff)
downloadphp-upstream/5.3.2.tar.gz
Imported Upstream version 5.3.2upstream/5.3.2
Diffstat (limited to 'ext/mysqli/tests')
-rw-r--r--ext/mysqli/tests/001.phpt2
-rw-r--r--ext/mysqli/tests/002.phpt4
-rw-r--r--ext/mysqli/tests/003.phpt4
-rw-r--r--ext/mysqli/tests/004.phpt2
-rw-r--r--ext/mysqli/tests/005.phpt4
-rw-r--r--ext/mysqli/tests/006.phpt4
-rw-r--r--ext/mysqli/tests/007.phpt4
-rw-r--r--ext/mysqli/tests/008.phpt4
-rw-r--r--ext/mysqli/tests/009.phpt4
-rw-r--r--ext/mysqli/tests/010.phpt4
-rw-r--r--ext/mysqli/tests/011.phpt4
-rw-r--r--ext/mysqli/tests/012.phpt4
-rw-r--r--ext/mysqli/tests/013.phpt4
-rw-r--r--ext/mysqli/tests/014.phpt4
-rw-r--r--ext/mysqli/tests/015.phpt9
-rw-r--r--ext/mysqli/tests/016.phpt2
-rw-r--r--ext/mysqli/tests/017.phpt2
-rw-r--r--ext/mysqli/tests/018.phpt2
-rw-r--r--ext/mysqli/tests/019.phpt4
-rw-r--r--ext/mysqli/tests/020.phpt4
-rw-r--r--ext/mysqli/tests/021.phpt4
-rw-r--r--ext/mysqli/tests/022.phpt4
-rw-r--r--ext/mysqli/tests/023.phpt4
-rw-r--r--ext/mysqli/tests/024.phpt4
-rw-r--r--ext/mysqli/tests/025.phpt4
-rw-r--r--ext/mysqli/tests/026.phpt4
-rw-r--r--ext/mysqli/tests/027.phpt2
-rw-r--r--ext/mysqli/tests/028.phpt2
-rw-r--r--ext/mysqli/tests/029.phpt4
-rw-r--r--ext/mysqli/tests/030.phpt2
-rw-r--r--ext/mysqli/tests/031.phpt2
-rw-r--r--ext/mysqli/tests/032.phpt4
-rw-r--r--ext/mysqli/tests/033.phpt2
-rw-r--r--ext/mysqli/tests/034.phpt2
-rw-r--r--ext/mysqli/tests/035.phpt2
-rw-r--r--ext/mysqli/tests/036.phpt4
-rw-r--r--ext/mysqli/tests/037.phpt4
-rw-r--r--ext/mysqli/tests/038.phpt5
-rw-r--r--ext/mysqli/tests/039.phpt3
-rw-r--r--ext/mysqli/tests/040.phpt4
-rw-r--r--ext/mysqli/tests/041.phpt4
-rw-r--r--ext/mysqli/tests/042.phpt4
-rw-r--r--ext/mysqli/tests/043.phpt4
-rw-r--r--ext/mysqli/tests/044.phpt2
-rw-r--r--ext/mysqli/tests/045.phpt4
-rw-r--r--ext/mysqli/tests/046.phpt4
-rw-r--r--ext/mysqli/tests/047.phpt4
-rw-r--r--ext/mysqli/tests/048.phpt4
-rw-r--r--ext/mysqli/tests/049.phpt2
-rw-r--r--ext/mysqli/tests/050.phpt2
-rw-r--r--ext/mysqli/tests/051.phpt2
-rw-r--r--ext/mysqli/tests/052.phpt2
-rw-r--r--ext/mysqli/tests/053.phpt2
-rw-r--r--ext/mysqli/tests/054.phpt2
-rw-r--r--ext/mysqli/tests/055.phpt2
-rw-r--r--ext/mysqli/tests/056.phpt2
-rw-r--r--ext/mysqli/tests/057.phpt4
-rw-r--r--ext/mysqli/tests/058.phpt4
-rw-r--r--ext/mysqli/tests/059.phpt4
-rw-r--r--ext/mysqli/tests/060.phpt4
-rw-r--r--ext/mysqli/tests/061.phpt4
-rw-r--r--ext/mysqli/tests/062.phpt2
-rw-r--r--ext/mysqli/tests/063.phpt2
-rw-r--r--ext/mysqli/tests/064.phpt2
-rw-r--r--ext/mysqli/tests/065.phpt2
-rw-r--r--ext/mysqli/tests/066.phpt5
-rw-r--r--ext/mysqli/tests/067.phpt6
-rw-r--r--ext/mysqli/tests/069.phpt2
-rw-r--r--ext/mysqli/tests/070.phpt2
-rw-r--r--ext/mysqli/tests/071.phpt43
-rw-r--r--ext/mysqli/tests/072.phpt2
-rw-r--r--ext/mysqli/tests/073.phpt2
-rw-r--r--ext/mysqli/tests/074.phpt2
-rw-r--r--ext/mysqli/tests/bug28817.phpt8
-rw-r--r--ext/mysqli/tests/bug29311.phpt2
-rw-r--r--ext/mysqli/tests/bug30967.phpt8
-rw-r--r--ext/mysqli/tests/bug31668.phpt2
-rw-r--r--ext/mysqli/tests/bug32405.phpt4
-rw-r--r--ext/mysqli/tests/bug33263.phpt3
-rw-r--r--ext/mysqli/tests/bug34810.phpt8
-rw-r--r--ext/mysqli/tests/bug35103.phpt4
-rw-r--r--ext/mysqli/tests/bug35517.phpt4
-rw-r--r--ext/mysqli/tests/bug35759.phpt4
-rw-r--r--ext/mysqli/tests/bug36420.phpt2
-rw-r--r--ext/mysqli/tests/bug36745.phpt4
-rw-r--r--ext/mysqli/tests/bug36802.phpt2
-rw-r--r--ext/mysqli/tests/bug36949.phpt4
-rw-r--r--ext/mysqli/tests/bug37090.phpt2
-rwxr-xr-xext/mysqli/tests/bug38710.phpt2
-rw-r--r--ext/mysqli/tests/bug39457.phpt6
-rw-r--r--ext/mysqli/tests/bug42548.phpt2
-rw-r--r--ext/mysqli/tests/bug44897.phpt3
-rw-r--r--ext/mysqli/tests/bug46109.phpt8
-rw-r--r--ext/mysqli/tests/bug48909.phpt2
-rw-r--r--ext/mysqli/tests/bug50772.phpt36
-rw-r--r--ext/mysqli/tests/connect.inc79
-rw-r--r--ext/mysqli/tests/mysqli_affected_rows.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_affected_rows_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_autocommit.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_autocommit_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_change_user.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_change_user_insert_id.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_change_user_rollback.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_character_set.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_character_set_name.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_character_set_name_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_interface.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt282
-rw-r--r--ext/mysqli/tests/mysqli_close.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_close_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_commit.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_commit_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_connect.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_connect_errno.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_connect_error.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_connect_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_connect_oo_defaults.phpt43
-rw-r--r--ext/mysqli/tests/mysqli_connect_oo_warnings.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_connect_twice.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_constants.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_data_seek.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_data_seek_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_disable_reads_from_master.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_driver.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_dump_debug_info.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_embedded_connect.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_enable_reads_from_master.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_errno.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_errno_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_error.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_error_oo.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_error_unicode.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_all.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_all_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array_assoc.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array_large.phpt30
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_direct.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_flags.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_types.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_fetch_fields.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_lengths.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_no_object.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_row.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_field_count.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_field_seek.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_field_tell.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fork.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_free_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_get_cache_stats.phpt116
-rw-r--r--ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt99
-rw-r--r--ext/mysqli/tests/mysqli_get_charset.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_get_client_info.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_get_client_stats.phpt68
-rw-r--r--ext/mysqli/tests/mysqli_get_connection_stats.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_get_host_info.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_get_proto_info.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_get_server_info.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_get_server_version.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_get_warnings.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_info.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_insert_id.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_insert_id_variation.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_insert_packet_overflow.phpt108
-rw-r--r--ext/mysqli/tests/mysqli_kill.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_more_results.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_multi_query.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_next_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_no_reconnect.phpt15
-rw-r--r--ext/mysqli/tests/mysqli_num_fields.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_num_rows.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_options.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_options_init_command.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt164
-rw-r--r--ext/mysqli/tests/mysqli_pconn_disabled.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_pconn_max_links.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_pconn_reuse.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_pconn_twice.phpt79
-rw-r--r--ext/mysqli/tests/mysqli_pconnect.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_phpinfo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_ping.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_prepare.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_prepare_no_object.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_query.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_query_local_infile_large.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_query_stored_proc.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_real_escape_string.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_real_query.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_report.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_report_wo_ps.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_result_unclonable.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_rollback.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_select_db.phpt2
-rwxr-xr-xext/mysqli/tests/mysqli_send_query.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_charset.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt5
-rwxr-xr-xext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_opt.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_sqlstate.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_ssl_set.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stat.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_stmt_affected_rows.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_get.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_set.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_close.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_data_seek.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_datatype_change.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_stmt_errno.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_error.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_execute.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_fetch.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_stmt_field_count.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_free_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result2.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_init.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_insert_id.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_num_rows.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_param_count.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_prepare.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_reset.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_result_metadata.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_send_long_data.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt1
-rw-r--r--ext/mysqli/tests/mysqli_stmt_sqlstate.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_store_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_unclonable.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_store_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_thread_id.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_unclonable.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_use_result.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_warning_count.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_warning_unclonable.phpt2
279 files changed, 1240 insertions, 679 deletions
diff --git a/ext/mysqli/tests/001.phpt b/ext/mysqli/tests/001.phpt
index 4e19d8109..ed09b2eec 100644
--- a/ext/mysqli/tests/001.phpt
+++ b/ext/mysqli/tests/001.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$test = "";
diff --git a/ext/mysqli/tests/002.phpt b/ext/mysqli/tests/002.phpt
index 6bbdecfdc..c18310871 100644
--- a/ext/mysqli/tests/002.phpt
+++ b/ext/mysqli/tests/002.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
@@ -48,7 +48,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/003.phpt b/ext/mysqli/tests/003.phpt
index e22fec143..9094c86a7 100644
--- a/ext/mysqli/tests/003.phpt
+++ b/ext/mysqli/tests/003.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -74,7 +74,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt
index 1eae99df7..184eceaa8 100644
--- a/ext/mysqli/tests/004.phpt
+++ b/ext/mysqli/tests/004.phpt
@@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/005.phpt b/ext/mysqli/tests/005.phpt
index 728f45e06..0d59f40b7 100644
--- a/ext/mysqli/tests/005.phpt
+++ b/ext/mysqli/tests/005.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/006.phpt b/ext/mysqli/tests/006.phpt
index a10e22c44..497426598 100644
--- a/ext/mysqli/tests/006.phpt
+++ b/ext/mysqli/tests/006.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/007.phpt b/ext/mysqli/tests/007.phpt
index fe266bf1b..05a8ae5ba 100644
--- a/ext/mysqli/tests/007.phpt
+++ b/ext/mysqli/tests/007.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/008.phpt b/ext/mysqli/tests/008.phpt
index 685110f08..ba0e34089 100644
--- a/ext/mysqli/tests/008.phpt
+++ b/ext/mysqli/tests/008.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/009.phpt b/ext/mysqli/tests/009.phpt
index 0584a14cf..3e26f518a 100644
--- a/ext/mysqli/tests/009.phpt
+++ b/ext/mysqli/tests/009.phpt
@@ -11,7 +11,7 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -80,7 +80,7 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/010.phpt b/ext/mysqli/tests/010.phpt
index de22c0824..fab0c5788 100644
--- a/ext/mysqli/tests/010.phpt
+++ b/ext/mysqli/tests/010.phpt
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/011.phpt b/ext/mysqli/tests/011.phpt
index 4c4ff7706..83f35e586 100644
--- a/ext/mysqli/tests/011.phpt
+++ b/ext/mysqli/tests/011.phpt
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/012.phpt b/ext/mysqli/tests/012.phpt
index 2ce810400..da4a48ab5 100644
--- a/ext/mysqli/tests/012.phpt
+++ b/ext/mysqli/tests/012.phpt
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -46,7 +46,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/013.phpt b/ext/mysqli/tests/013.phpt
index 8c123d1ab..5ddb49632 100644
--- a/ext/mysqli/tests/013.phpt
+++ b/ext/mysqli/tests/013.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -58,7 +58,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/014.phpt b/ext/mysqli/tests/014.phpt
index cd7fa19c7..8fb8cceef 100644
--- a/ext/mysqli/tests/014.phpt
+++ b/ext/mysqli/tests/014.phpt
@@ -4,7 +4,7 @@ mysqli autocommit/commit/rollback
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) {
die("skip Cannot check for required InnoDB suppot");
@@ -21,7 +21,7 @@ mysqli autocommit/commit/rollback
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!mysqli_autocommit($link, TRUE))
diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt
index b3af0142a..c4f693ff1 100644
--- a/ext/mysqli/tests/015.phpt
+++ b/ext/mysqli/tests/015.phpt
@@ -4,20 +4,21 @@ mysqli autocommit/commit/rollback with innodb
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'");
$row = mysqli_fetch_row($result);
mysqli_free_result($result);
mysqli_close($link);
- if ($row[1] == "NO") {
- printf ("skip innodb support not installed.");
+ if ($row[1] == "DISABLED" || $row[1] == "NO") {
+ printf ("skip innodb support is not installed or enabled.");
+ exit;
}
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!$link)
diff --git a/ext/mysqli/tests/016.phpt b/ext/mysqli/tests/016.phpt
index c8046de9a..ce1ea8306 100644
--- a/ext/mysqli/tests/016.phpt
+++ b/ext/mysqli/tests/016.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/017.phpt b/ext/mysqli/tests/017.phpt
index 7220b4ef0..a48ae5c9d 100644
--- a/ext/mysqli/tests/017.phpt
+++ b/ext/mysqli/tests/017.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/018.phpt b/ext/mysqli/tests/018.phpt
index 1a8d76208..87476442d 100644
--- a/ext/mysqli/tests/018.phpt
+++ b/ext/mysqli/tests/018.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/019.phpt b/ext/mysqli/tests/019.phpt
index f3741a5d3..51cf97332 100644
--- a/ext/mysqli/tests/019.phpt
+++ b/ext/mysqli/tests/019.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/020.phpt b/ext/mysqli/tests/020.phpt
index f313a616a..6e867d7a0 100644
--- a/ext/mysqli/tests/020.phpt
+++ b/ext/mysqli/tests/020.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -69,7 +69,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/021.phpt b/ext/mysqli/tests/021.phpt
index 3843566ea..5dec86c90 100644
--- a/ext/mysqli/tests/021.phpt
+++ b/ext/mysqli/tests/021.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -40,7 +40,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/022.phpt b/ext/mysqli/tests/022.phpt
index 5c448b9c1..8e1f0170a 100644
--- a/ext/mysqli/tests/022.phpt
+++ b/ext/mysqli/tests/022.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -45,7 +45,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/023.phpt b/ext/mysqli/tests/023.phpt
index d3d4762a6..97c781256 100644
--- a/ext/mysqli/tests/023.phpt
+++ b/ext/mysqli/tests/023.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/024.phpt b/ext/mysqli/tests/024.phpt
index 7dd540853..2cb93be96 100644
--- a/ext/mysqli/tests/024.phpt
+++ b/ext/mysqli/tests/024.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/025.phpt b/ext/mysqli/tests/025.phpt
index 9c076dfae..84a9f67a1 100644
--- a/ext/mysqli/tests/025.phpt
+++ b/ext/mysqli/tests/025.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -59,7 +59,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/026.phpt b/ext/mysqli/tests/026.phpt
index 57fe33e00..ec4baa262 100644
--- a/ext/mysqli/tests/026.phpt
+++ b/ext/mysqli/tests/026.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -46,7 +46,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/027.phpt b/ext/mysqli/tests/027.phpt
index 0926b70e2..69233d683 100644
--- a/ext/mysqli/tests/027.phpt
+++ b/ext/mysqli/tests/027.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/028.phpt b/ext/mysqli/tests/028.phpt
index 6c4425e2b..af453dde0 100644
--- a/ext/mysqli/tests/028.phpt
+++ b/ext/mysqli/tests/028.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/029.phpt b/ext/mysqli/tests/029.phpt
index bfc54bcc6..936420649 100644
--- a/ext/mysqli/tests/029.phpt
+++ b/ext/mysqli/tests/029.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -28,7 +28,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/030.phpt b/ext/mysqli/tests/030.phpt
index 656946fb6..c4b171043 100644
--- a/ext/mysqli/tests/030.phpt
+++ b/ext/mysqli/tests/030.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/031.phpt b/ext/mysqli/tests/031.phpt
index 9f632cb42..9b8c720d3 100644
--- a/ext/mysqli/tests/031.phpt
+++ b/ext/mysqli/tests/031.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/032.phpt b/ext/mysqli/tests/032.phpt
index 386883d0e..5fcd5484d 100644
--- a/ext/mysqli/tests/032.phpt
+++ b/ext/mysqli/tests/032.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -28,7 +28,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/033.phpt b/ext/mysqli/tests/033.phpt
index ade0bb832..b499bd71a 100644
--- a/ext/mysqli/tests/033.phpt
+++ b/ext/mysqli/tests/033.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/034.phpt b/ext/mysqli/tests/034.phpt
index cc415344c..3fda56008 100644
--- a/ext/mysqli/tests/034.phpt
+++ b/ext/mysqli/tests/034.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/035.phpt b/ext/mysqli/tests/035.phpt
index 7b621aa22..7b18e027b 100644
--- a/ext/mysqli/tests/035.phpt
+++ b/ext/mysqli/tests/035.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/036.phpt b/ext/mysqli/tests/036.phpt
index 4e68b6c2a..b0d259c3f 100644
--- a/ext/mysqli/tests/036.phpt
+++ b/ext/mysqli/tests/036.phpt
@@ -11,7 +11,7 @@ function test: mysqli_insert_id()
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -44,7 +44,7 @@ function test: mysqli_insert_id()
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/037.phpt b/ext/mysqli/tests/037.phpt
index 856bdc698..03d5d5562 100644
--- a/ext/mysqli/tests/037.phpt
+++ b/ext/mysqli/tests/037.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -34,7 +34,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/038.phpt b/ext/mysqli/tests/038.phpt
index 7be16f449..45b724ca3 100644
--- a/ext/mysqli/tests/038.phpt
+++ b/ext/mysqli/tests/038.phpt
@@ -7,8 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -35,7 +34,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/039.phpt b/ext/mysqli/tests/039.phpt
index 9ed7ef9ea..ae881e1d2 100644
--- a/ext/mysqli/tests/039.phpt
+++ b/ext/mysqli/tests/039.phpt
@@ -7,8 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/040.phpt b/ext/mysqli/tests/040.phpt
index 6b115166b..3e2888355 100644
--- a/ext/mysqli/tests/040.phpt
+++ b/ext/mysqli/tests/040.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -33,7 +33,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/041.phpt b/ext/mysqli/tests/041.phpt
index aac91f86a..ec67e476c 100644
--- a/ext/mysqli/tests/041.phpt
+++ b/ext/mysqli/tests/041.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -24,7 +24,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/042.phpt b/ext/mysqli/tests/042.phpt
index 9d79f148c..55da0cd82 100644
--- a/ext/mysqli/tests/042.phpt
+++ b/ext/mysqli/tests/042.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/043.phpt b/ext/mysqli/tests/043.phpt
index 51b2a91ff..5d060b9bb 100644
--- a/ext/mysqli/tests/043.phpt
+++ b/ext/mysqli/tests/043.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/044.phpt b/ext/mysqli/tests/044.phpt
index 9d227f49e..3ddae3e42 100644
--- a/ext/mysqli/tests/044.phpt
+++ b/ext/mysqli/tests/044.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt
index d5ee5ad2b..0b1706002 100644
--- a/ext/mysqli/tests/045.phpt
+++ b/ext/mysqli/tests/045.phpt
@@ -6,7 +6,7 @@ mysqli_bind_result (SHOW)
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd);
$stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
@@ -20,7 +20,7 @@ mysqli_bind_result (SHOW)
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/046.phpt b/ext/mysqli/tests/046.phpt
index cf7739210..18c86e316 100644
--- a/ext/mysqli/tests/046.phpt
+++ b/ext/mysqli/tests/046.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -36,7 +36,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/047.phpt b/ext/mysqli/tests/047.phpt
index 3401418e9..5a8685703 100644
--- a/ext/mysqli/tests/047.phpt
+++ b/ext/mysqli/tests/047.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/048.phpt b/ext/mysqli/tests/048.phpt
index 5ab60e5a5..afc092357 100644
--- a/ext/mysqli/tests/048.phpt
+++ b/ext/mysqli/tests/048.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/049.phpt b/ext/mysqli/tests/049.phpt
index eb977a8b6..c87f36948 100644
--- a/ext/mysqli/tests/049.phpt
+++ b/ext/mysqli/tests/049.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/050.phpt b/ext/mysqli/tests/050.phpt
index ba668f0a8..4e750c924 100644
--- a/ext/mysqli/tests/050.phpt
+++ b/ext/mysqli/tests/050.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/************************
* non freed stamement
diff --git a/ext/mysqli/tests/051.phpt b/ext/mysqli/tests/051.phpt
index 82665156d..ac85410bb 100644
--- a/ext/mysqli/tests/051.phpt
+++ b/ext/mysqli/tests/051.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/************************
* free statement after close
diff --git a/ext/mysqli/tests/052.phpt b/ext/mysqli/tests/052.phpt
index f280d8406..89336ade6 100644
--- a/ext/mysqli/tests/052.phpt
+++ b/ext/mysqli/tests/052.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/************************
* statement call after close
diff --git a/ext/mysqli/tests/053.phpt b/ext/mysqli/tests/053.phpt
index e0bbcbeee..a1840c972 100644
--- a/ext/mysqli/tests/053.phpt
+++ b/ext/mysqli/tests/053.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/************************
* non freed resultset
diff --git a/ext/mysqli/tests/054.phpt b/ext/mysqli/tests/054.phpt
index 2d957cb3c..6bd45a7c4 100644
--- a/ext/mysqli/tests/054.phpt
+++ b/ext/mysqli/tests/054.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/************************
* free resultset after close
diff --git a/ext/mysqli/tests/055.phpt b/ext/mysqli/tests/055.phpt
index 1f0461bb2..c73266e74 100644
--- a/ext/mysqli/tests/055.phpt
+++ b/ext/mysqli/tests/055.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/************************
* don't free anything
diff --git a/ext/mysqli/tests/056.phpt b/ext/mysqli/tests/056.phpt
index f5571aca6..413e67898 100644
--- a/ext/mysqli/tests/056.phpt
+++ b/ext/mysqli/tests/056.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
class foobar extends mysqli {
function test () {
diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt
index 9da9a1014..92f82d4e1 100644
--- a/ext/mysqli/tests/057.phpt
+++ b/ext/mysqli/tests/057.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -64,7 +64,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/058.phpt b/ext/mysqli/tests/058.phpt
index d1a90a004..a8312617c 100644
--- a/ext/mysqli/tests/058.phpt
+++ b/ext/mysqli/tests/058.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/059.phpt b/ext/mysqli/tests/059.phpt
index 4897981cf..733a3cefb 100644
--- a/ext/mysqli/tests/059.phpt
+++ b/ext/mysqli/tests/059.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -43,7 +43,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/060.phpt b/ext/mysqli/tests/060.phpt
index f1c20bfa1..5d17f8f95 100644
--- a/ext/mysqli/tests/060.phpt
+++ b/ext/mysqli/tests/060.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
class test_class {
function __construct($arg1, $arg2) {
@@ -44,7 +44,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt
index e40f3a273..08b4cda25 100644
--- a/ext/mysqli/tests/061.phpt
+++ b/ext/mysqli/tests/061.phpt
@@ -9,7 +9,7 @@ if (!function_exists('mysqli_set_local_infile_handler'))
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
function my_read($fp, &$buffer, $buflen, &$error) {
$buffer = strrev(fread($fp, $buflen));
@@ -51,7 +51,7 @@ if (!function_exists('mysqli_set_local_infile_handler'))
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/062.phpt b/ext/mysqli/tests/062.phpt
index 043855365..bc6198c6a 100644
--- a/ext/mysqli/tests/062.phpt
+++ b/ext/mysqli/tests/062.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/063.phpt b/ext/mysqli/tests/063.phpt
index 9b42ab7fb..b184d72ee 100644
--- a/ext/mysqli/tests/063.phpt
+++ b/ext/mysqli/tests/063.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/064.phpt b/ext/mysqli/tests/064.phpt
index a308e4ab2..46af7a662 100644
--- a/ext/mysqli/tests/064.phpt
+++ b/ext/mysqli/tests/064.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/065.phpt b/ext/mysqli/tests/065.phpt
index d0f1d1629..172cecde3 100644
--- a/ext/mysqli/tests/065.phpt
+++ b/ext/mysqli/tests/065.phpt
@@ -14,7 +14,7 @@ if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/066.phpt b/ext/mysqli/tests/066.phpt
index 7581876ca..91dfce507 100644
--- a/ext/mysqli/tests/066.phpt
+++ b/ext/mysqli/tests/066.phpt
@@ -7,8 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-
- include "connect.inc";
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
@@ -30,7 +29,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/067.phpt b/ext/mysqli/tests/067.phpt
index f57149518..d5795bdee 100644
--- a/ext/mysqli/tests/067.phpt
+++ b/ext/mysqli/tests/067.phpt
@@ -4,7 +4,7 @@ function test: nested selects (cursors)
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
- include "connect.inc";
+ require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
die("skip Cannot connect to check required version");
@@ -29,7 +29,7 @@ function test: nested selects (cursors)
return $stmt;
}
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
if ((!$IS_MYSQLND && mysqli_get_client_version() < 50009) ||
@@ -66,7 +66,7 @@ function test: nested selects (cursors)
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/069.phpt b/ext/mysqli/tests/069.phpt
index 404b6ab10..ee76ca5c1 100644
--- a/ext/mysqli/tests/069.phpt
+++ b/ext/mysqli/tests/069.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->multi_query('SELECT 1;SELECT 2');
diff --git a/ext/mysqli/tests/070.phpt b/ext/mysqli/tests/070.phpt
index eee512513..b71d9b2e4 100644
--- a/ext/mysqli/tests/070.phpt
+++ b/ext/mysqli/tests/070.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
var_dump($mysql->ping());
diff --git a/ext/mysqli/tests/071.phpt b/ext/mysqli/tests/071.phpt
index 8888fb170..38bc46b84 100644
--- a/ext/mysqli/tests/071.phpt
+++ b/ext/mysqli/tests/071.phpt
@@ -8,13 +8,31 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
+ $version = $mysql->server_version;
var_dump($mysql->ping());
- var_dump($mysql->kill($mysql->thread_id));
+ $ret = $mysql->kill($mysql->thread_id);
+ if ($IS_MYSQLND) {
+ if ($ret !== true){
+ printf("[001] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true));
+ }
+ } else {
+ /* libmysql return value seems to depend on server version */
+ if (($version >= 50123 || $version <= 40200) && $version != 50200) {
+ /* TODO: find exact version */
+ if ($ret !== true){
+ printf("[001] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
+ }
+ } else {
+ if ($ret !== false){
+ printf("[001] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
+ }
+ }
+ }
var_dump($mysql->ping());
@@ -24,7 +42,24 @@ require_once('skipifconnectfailure.inc');
var_dump(mysqli_ping($mysql));
- var_dump(mysqli_kill($mysql, mysqli_thread_id($mysql)));
+ $ret = $mysql->kill($mysql->thread_id);
+ if ($IS_MYSQLND) {
+ if ($ret !== true){
+ printf("[002] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true));
+ }
+ } else {
+ /* libmysql return value seems to depend on server version */
+ if (($version >= 50123 || $version <= 40200) && $version != 50200) {
+ /* TODO: find exact version */
+ if ($ret !== true){
+ printf("[002] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
+ }
+ } else {
+ if ($ret !== false){
+ printf("[002] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
+ }
+ }
+ }
var_dump(mysqli_ping($mysql));
@@ -33,9 +68,7 @@ require_once('skipifconnectfailure.inc');
?>
--EXPECT--
bool(true)
-bool(true)
bool(false)
bool(true)
-bool(true)
bool(false)
done! \ No newline at end of file
diff --git a/ext/mysqli/tests/072.phpt b/ext/mysqli/tests/072.phpt
index 637014b29..036253a0b 100644
--- a/ext/mysqli/tests/072.phpt
+++ b/ext/mysqli/tests/072.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/073.phpt b/ext/mysqli/tests/073.phpt
index 7428bc371..c70f7d947 100644
--- a/ext/mysqli/tests/073.phpt
+++ b/ext/mysqli/tests/073.phpt
@@ -4,7 +4,7 @@ mysqli_driver properties
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
var_dump($driver->embedded);
var_dump($driver->client_version);
diff --git a/ext/mysqli/tests/074.phpt b/ext/mysqli/tests/074.phpt
index 883655bc5..7d9d01b3b 100644
--- a/ext/mysqli/tests/074.phpt
+++ b/ext/mysqli/tests/074.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/bug28817.phpt b/ext/mysqli/tests/bug28817.phpt
index e5fa7d563..254c0e50d 100644
--- a/ext/mysqli/tests/bug28817.phpt
+++ b/ext/mysqli/tests/bug28817.phpt
@@ -1,14 +1,14 @@
--TEST--
Bug #28817 (problems with properties declared in the class extending MySQLi)
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
-
+ require_once("connect.inc");
+
class my_mysql extends mysqli {
public $p_test;
diff --git a/ext/mysqli/tests/bug29311.phpt b/ext/mysqli/tests/bug29311.phpt
index 83b18388c..cd7b9ef00 100644
--- a/ext/mysqli/tests/bug29311.phpt
+++ b/ext/mysqli/tests/bug29311.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/* class 1 calls parent constructor */
class mysql1 extends mysqli {
diff --git a/ext/mysqli/tests/bug30967.phpt b/ext/mysqli/tests/bug30967.phpt
index 8051acbdb..48007cee6 100644
--- a/ext/mysqli/tests/bug30967.phpt
+++ b/ext/mysqli/tests/bug30967.phpt
@@ -1,14 +1,14 @@
--TEST--
Bug #30967 (problems with properties declared in the class extending the class extending MySQLi)
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
-
+ require_once("connect.inc");
+
class mysql1 extends mysqli {
}
diff --git a/ext/mysqli/tests/bug31668.phpt b/ext/mysqli/tests/bug31668.phpt
index cdca551f2..9b769a1ba 100644
--- a/ext/mysqli/tests/bug31668.phpt
+++ b/ext/mysqli/tests/bug31668.phpt
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
error_reporting = E_ALL & ~E_STRICT
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->multi_query('SELECT 1;SELECT 2');
diff --git a/ext/mysqli/tests/bug32405.phpt b/ext/mysqli/tests/bug32405.phpt
index 24bcdb4d0..0b3cad50f 100644
--- a/ext/mysqli/tests/bug32405.phpt
+++ b/ext/mysqli/tests/bug32405.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include ("connect.inc");
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -33,7 +33,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug33263.phpt b/ext/mysqli/tests/bug33263.phpt
index 4f2a37c86..ac2de197b 100644
--- a/ext/mysqli/tests/bug33263.phpt
+++ b/ext/mysqli/tests/bug33263.phpt
@@ -8,8 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-
- include "connect.inc";
+ require_once("connect.inc");
class test extends mysqli
{
diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt
index fac805312..998d9f015 100644
--- a/ext/mysqli/tests/bug34810.phpt
+++ b/ext/mysqli/tests/bug34810.phpt
@@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc');
class DbConnection {
public function connect() {
- include "connect.inc";
+ require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
var_dump($link);
@@ -35,7 +35,7 @@ echo "Done\n";
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
@@ -55,7 +55,7 @@ object(mysqli)#%d (%d) {
[%u|b%"connect_errno"]=>
int(0)
[%u|b%"connect_error"]=>
- %unicode|string%(0) ""
+ NULL
[%u|b%"errno"]=>
int(0)
[%u|b%"error"]=>
@@ -91,7 +91,7 @@ object(mysqli)#%d (%d) {
[%u|b%"connect_errno"]=>
int(0)
[%u|b%"connect_error"]=>
- %unicode|string%(0) ""
+ NULL
[%u|b%"errno"]=>
int(0)
[%u|b%"error"]=>
diff --git a/ext/mysqli/tests/bug35103.phpt b/ext/mysqli/tests/bug35103.phpt
index 9c137b554..fc3cad04c 100644
--- a/ext/mysqli/tests/bug35103.phpt
+++ b/ext/mysqli/tests/bug35103.phpt
@@ -12,7 +12,7 @@ $drop = <<<EOSQL
DROP TABLE test_bint;
DROP TABLE test_buint;
EOSQL;
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->query("DROP TABLE IF EXISTS test_bint");
@@ -53,7 +53,7 @@ EOSQL;
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug35517.phpt b/ext/mysqli/tests/bug35517.phpt
index c769eed1f..746251f97 100644
--- a/ext/mysqli/tests/bug35517.phpt
+++ b/ext/mysqli/tests/bug35517.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
@@ -39,7 +39,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug35759.phpt b/ext/mysqli/tests/bug35759.phpt
index 39b21c476..cbceb3b42 100644
--- a/ext/mysqli/tests/bug35759.phpt
+++ b/ext/mysqli/tests/bug35759.phpt
@@ -14,7 +14,7 @@ CREATE TABLE blobby (
EOSQL;
- include "connect.inc";
+ require_once("connect.inc");
$col_num= 1000;
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
@@ -47,7 +47,7 @@ EOSQL;
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug36420.phpt b/ext/mysqli/tests/bug36420.phpt
index 54657a700..6dd03b37f 100644
--- a/ext/mysqli/tests/bug36420.phpt
+++ b/ext/mysqli/tests/bug36420.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
-include "connect.inc";
+require_once("connect.inc");
$mysqli = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$result = $mysqli->query('select 1');
diff --git a/ext/mysqli/tests/bug36745.phpt b/ext/mysqli/tests/bug36745.phpt
index 511eaf38f..5e203e14e 100644
--- a/ext/mysqli/tests/bug36745.phpt
+++ b/ext/mysqli/tests/bug36745.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include ("connect.inc");
+ require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
@@ -23,7 +23,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug36802.phpt b/ext/mysqli/tests/bug36802.phpt
index d7144bdda..3694a26db 100644
--- a/ext/mysqli/tests/bug36802.phpt
+++ b/ext/mysqli/tests/bug36802.phpt
@@ -10,7 +10,7 @@ Bug #36802 (crashes with with mysqli_set_charset())
}
}
- include "connect.inc";
+ require_once("connect.inc");
$mysql = mysqli_init();
/* following operations should not work */
diff --git a/ext/mysqli/tests/bug36949.phpt b/ext/mysqli/tests/bug36949.phpt
index 39909f9ef..2b3cc4955 100644
--- a/ext/mysqli/tests/bug36949.phpt
+++ b/ext/mysqli/tests/bug36949.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-include "connect.inc";
+require_once("connect.inc");
class A {
private $mysqli;
@@ -49,7 +49,7 @@ $B = new B();
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug37090.phpt b/ext/mysqli/tests/bug37090.phpt
index 7e8b4931b..839081df5 100644
--- a/ext/mysqli/tests/bug37090.phpt
+++ b/ext/mysqli/tests/bug37090.phpt
@@ -13,7 +13,7 @@ if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1)) {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/bug38710.phpt b/ext/mysqli/tests/bug38710.phpt
index 280a51a6f..c3bb7285c 100755
--- a/ext/mysqli/tests/bug38710.phpt
+++ b/ext/mysqli/tests/bug38710.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-include "connect.inc";
+require_once("connect.inc");
$db = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$qry=$db->stmt_init();
diff --git a/ext/mysqli/tests/bug39457.phpt b/ext/mysqli/tests/bug39457.phpt
index b834ff1b7..ec9239bb1 100644
--- a/ext/mysqli/tests/bug39457.phpt
+++ b/ext/mysqli/tests/bug39457.phpt
@@ -1,13 +1,13 @@
--TEST--
Bug #39457 (Multiple invoked OO connections never close)
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysql = mysqli_init();
$mysql->connect($host, $user, $passwd, $db, $port, $socket);
diff --git a/ext/mysqli/tests/bug42548.phpt b/ext/mysqli/tests/bug42548.phpt
index c9950be3a..ef0c831e4 100644
--- a/ext/mysqli/tests/bug42548.phpt
+++ b/ext/mysqli/tests/bug42548.phpt
@@ -52,7 +52,7 @@ print "done!";
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug44897.phpt b/ext/mysqli/tests/bug44897.phpt
index 92fc0a2e2..84c245d0f 100644
--- a/ext/mysqli/tests/bug44897.phpt
+++ b/ext/mysqli/tests/bug44897.phpt
@@ -19,7 +19,6 @@ if (mysqli_get_server_version($link) <= 50000) {
?>
--FILE--
<?php
- require_once("connect.inc");
require_once("table.inc");
if (!$link->query('DROP PROCEDURE IF EXISTS p'))
@@ -74,7 +73,7 @@ if (mysqli_get_server_version($link) <= 50000) {
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/bug46109.phpt b/ext/mysqli/tests/bug46109.phpt
index bbb2903ab..c377171b7 100644
--- a/ext/mysqli/tests/bug46109.phpt
+++ b/ext/mysqli/tests/bug46109.phpt
@@ -1,18 +1,18 @@
--TEST--
Bug #46109 (MySQLi::init - Memory leaks)
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysqli = new mysqli();
$mysqli->init();
$mysqli->init();
- echo "done";
+ echo "done";
?>
--EXPECTF--
done
diff --git a/ext/mysqli/tests/bug48909.phpt b/ext/mysqli/tests/bug48909.phpt
index 55c85a686..81df54419 100644
--- a/ext/mysqli/tests/bug48909.phpt
+++ b/ext/mysqli/tests/bug48909.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/bug50772.phpt b/ext/mysqli/tests/bug50772.phpt
new file mode 100644
index 000000000..4724d0f29
--- /dev/null
+++ b/ext/mysqli/tests/bug50772.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #50772 (mysqli constructor without parameters does not return a working mysqli object)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
+--FILE--
+<?php
+ include "connect.inc";
+ $db1 = new mysqli();
+
+ // These calls fail
+ $db1->options(MYSQLI_OPT_CONNECT_TIMEOUT, 3);
+ $db1->real_connect($host, $user, $passwd);
+ if(mysqli_connect_error()) {
+ echo "error 1\n";
+ } else {
+ echo "ok 1\n";
+ }
+
+ $db2 = mysqli_init();
+
+ $db2->options(MYSQLI_OPT_CONNECT_TIMEOUT, 3);
+ $db2->real_connect($host, $user, $passwd);
+ if(mysqli_connect_error()) {
+ echo "error 2\n";
+ } else {
+ echo "ok 2\n";
+ }
+ echo "done\n";
+?>
+--EXPECTF--
+ok 1
+ok 2
+done \ No newline at end of file
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
index ad2428647..48ba893cc 100644
--- a/ext/mysqli/tests/connect.inc
+++ b/ext/mysqli/tests/connect.inc
@@ -74,53 +74,58 @@
}
}
- /**
- * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
- *
- * @param enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)?
- */
- function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) {
- global $connect_flags;
+ if (!function_exists('my_mysqli_connect')) {
- $flags = ($enable_env_flags) ? $connect_flags : false;
+ /**
+ * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
+ *
+ * @param enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)?
+ */
+ function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) {
+ global $connect_flags;
- if ($flags !== false) {
- $link = mysqli_init();
- if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags))
- $link = false;
- } else {
- $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
- }
+ $flags = ($enable_env_flags) ? $connect_flags : false;
- return $link;
- }
+ if ($flags !== false) {
+ $link = mysqli_init();
+ if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags))
+ $link = false;
+ } else {
+ $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+ }
- /**
- * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
- *
- * @param enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)
- */
- function my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags = 0, $enable_env_flags = true) {
- global $connect_flags;
+ return $link;
+ }
- if ($enable_env_flags)
- $flags & $connect_flags;
+ /**
+ * Whenever possible, please use this wrapper to make testing ot MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible
+ *
+ * @param enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)
+ */
+ function my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags = 0, $enable_env_flags = true) {
+ global $connect_flags;
- return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags);
- }
+ if ($enable_env_flags)
+ $flags & $connect_flags;
- class my_mysqli extends mysqli {
- public function __construct($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) {
- global $connect_flags;
+ return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags);
+ }
- $flags = ($enable_env_flags) ? $connect_flags : false;
+ class my_mysqli extends mysqli {
+ public function __construct($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) {
+ global $connect_flags;
- if ($flags !== false) {
- parent::init();
- $this->real_connect($host, $user, $passwd, $db, $port, $socket, $flags);
- } else {
- parent::__construct($host, $user, $passwd, $db, $port, $socket);
+ $flags = ($enable_env_flags) ? $connect_flags : false;
+
+ if ($flags !== false) {
+ parent::init();
+ $this->real_connect($host, $user, $passwd, $db, $port, $socket, $flags);
+ } else {
+ parent::__construct($host, $user, $passwd, $db, $port, $socket);
+ }
}
}
+ } else {
+ printf("skip Eeeek/BUG/FIXME - connect.inc included twice! skipif bug?\n");
}
?> \ 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 6cb5451c0..958b83cb3 100644
--- a/ext/mysqli/tests/mysqli_affected_rows.phpt
+++ b/ext/mysqli/tests/mysqli_affected_rows.phpt
@@ -8,7 +8,7 @@ mysqli_affected_rows()
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt
index 07b7bcb48..6da026bc5 100644
--- a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt
+++ b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt
@@ -8,7 +8,7 @@ mysqli->affected_rows
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$mysqli = new mysqli();
if (NULL !== ($tmp = @$mysqli->affected_rows))
diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt
index cdd555976..f1f63e7f3 100644
--- a/ext/mysqli/tests/mysqli_autocommit.phpt
+++ b/ext/mysqli/tests/mysqli_autocommit.phpt
@@ -26,7 +26,7 @@ mysqli_autocommit()
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt
index 8f2c4b472..b1777b9f6 100644
--- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt
+++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt
@@ -29,7 +29,7 @@ mysqli->autocommit()
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/mysqli_change_user.phpt b/ext/mysqli/tests/mysqli_change_user.phpt
index d889ec820..b699229ce 100644
--- a/ext/mysqli/tests/mysqli_change_user.phpt
+++ b/ext/mysqli/tests/mysqli_change_user.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt
index 83efb5149..30ea54147 100644
--- a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt
@@ -6,13 +6,16 @@ require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
+
if (!$IS_MYSQLND) {
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 */
+
+ if ((mysqli_get_client_version($link) <= 50139) || (mysqli_get_server_version($link) <= 50139))
+ /* #30472 got fixed in 5.1.23 but #45184 is open */
die(sprintf("skip libmysql %s should have bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184",
mysqli_get_client_version($link)));
+
mysqli_close($link);
}
?>
diff --git a/ext/mysqli/tests/mysqli_change_user_rollback.phpt b/ext/mysqli/tests/mysqli_change_user_rollback.phpt
index a57f80b67..97c2bd851 100644
--- a/ext/mysqli/tests/mysqli_change_user_rollback.phpt
+++ b/ext/mysqli/tests/mysqli_change_user_rollback.phpt
@@ -12,8 +12,9 @@ $row = mysqli_fetch_row($result);
mysqli_free_result($result);
mysqli_close($link);
-if ($row[1] == 'NO') {
- printf ("skip ROLLBACK requires transactional engine InnoDB");
+if ($row[1] == "DISABLED" || $row[1] == "NO") {
+ printf ("skip innodb support is not installed or enabled.");
+ exit;
}
?>
--FILE--
diff --git a/ext/mysqli/tests/mysqli_character_set.phpt b/ext/mysqli/tests/mysqli_character_set.phpt
index 11c92ce63..1fced9a3c 100644
--- a/ext/mysqli/tests/mysqli_character_set.phpt
+++ b/ext/mysqli/tests/mysqli_character_set.phpt
@@ -16,7 +16,7 @@ if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_character_set_name.phpt b/ext/mysqli/tests/mysqli_character_set_name.phpt
index 9a40099fe..3fa997b50 100644
--- a/ext/mysqli/tests/mysqli_character_set_name.phpt
+++ b/ext/mysqli/tests/mysqli_character_set_name.phpt
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
/* NOTE: http://bugs.mysql.com/bug.php?id=7923 makes this test fail very likely on all 4.1.x - 5.0.x! */
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
index a56cf6ae8..43a83bbcb 100644
--- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
+++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
@@ -9,7 +9,7 @@ mysqli_chararcter_set_name(), mysql_client_encoding() [alias]
--FILE--
<?php
/* NOTE: http://bugs.mysql.com/bug.php?id=7923 makes this test fail very likely on all 4.1.x - 5.0.x! */
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
index ad914b734..b86f69c44 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
@@ -276,6 +276,6 @@ setting mysqli->unknown, mysqli_unknown = '13'
setting mysqli->unknown, mysqli_unknown = 'friday'
Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
-mysqli->connect_error = ''/%unicode|string% (''/%unicode|string%)
+mysqli->connect_error = ''/NULL (''/NULL)
mysqli->connect_errno = '0'/integer ('0'/integer)
done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt
new file mode 100644
index 000000000..d0940a756
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt
@@ -0,0 +1,282 @@
+--TEST--
+Interface of the class mysqli
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+?>
+--FILE--
+<?php
+ require('table.inc');
+
+ function dump_properties($mysqli) {
+
+ printf("\nClass variables:\n");
+ $variables = array_keys(get_class_vars(get_class($mysqli)));
+ sort($variables);
+ foreach ($variables as $k => $var) {
+ printf("%s = '%s'\n", $var, var_export(@$mysqli->$var, true));
+ }
+
+ printf("\nObject variables:\n");
+ $variables = array_keys(get_object_vars($mysqli));
+ foreach ($variables as $k => $var) {
+ printf("%s = '%s'\n", $var, var_export(@$mysqli->$var, true));
+ }
+
+ printf("\nMagic, magic properties:\n");
+
+ assert(@mysqli_affected_rows($mysqli) === @$mysqli->affected_rows);
+ printf("mysqli->affected_rows = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->affected_rows, gettype(@$mysqli->affected_rows),
+ @mysqli_affected_rows($mysqli), gettype(@mysqli_affected_rows($mysqli)));
+
+ assert(@mysqli_get_client_info() === @$mysqli->client_info);
+ printf("mysqli->client_info = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->client_info, gettype(@$mysqli->client_info),
+ @mysqli_get_client_info(), gettype(@mysqli_get_client_info()));
+
+ assert(@mysqli_get_client_version() === @$mysqli->client_version);
+ printf("mysqli->client_version = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->client_version, gettype(@$mysqli->client_version),
+ @mysqli_get_client_version(), gettype(@mysqli_get_client_version()));
+
+ assert(@mysqli_errno($mysqli) === @$mysqli->errno);
+ printf("mysqli->errno = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->errno, gettype(@$mysqli->errno),
+
+ @mysqli_errno($mysqli), gettype(@mysqli_errno($mysqli)));
+
+ assert(@mysqli_error($mysqli) === @$mysqli->error);
+ printf("mysqli->error = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->error, gettype(@$mysqli->error),
+ @mysqli_error($mysqli), gettype(@mysqli_error($mysqli)));
+
+ assert(@mysqli_field_count($mysqli) === @$mysqli->field_count);
+ printf("mysqli->field_count = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->field_count, gettype(@$mysqli->field_count),
+ @mysqli_field_count($mysqli), gettype(@mysqli_field_count($mysqli)));
+
+ assert(@mysqli_insert_id($mysqli) === @$mysqli->insert_id);
+ printf("mysqli->insert_id = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->insert_id, gettype(@$mysqli->insert_id),
+ @mysqli_insert_id($mysqli), gettype(@mysqli_insert_id($mysqli)));
+
+ assert(@mysqli_sqlstate($mysqli) === @$mysqli->sqlstate);
+ printf("mysqli->sqlstate = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->sqlstate, gettype(@$mysqli->sqlstate),
+ @mysqli_sqlstate($mysqli), gettype(@mysqli_sqlstate($mysqli)));
+
+ assert(@mysqli_get_host_info($mysqli) === @$mysqli->host_info);
+ printf("mysqli->host_info = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->host_info, gettype(@$mysqli->host_info),
+ @mysqli_get_host_info($mysqli), gettype(@mysqli_get_host_info($mysqli)));
+
+ /* note that the data types are different */
+ assert(@mysqli_info($mysqli) == @$mysqli->info);
+ printf("mysqli->info = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->info, gettype(@$mysqli->info),
+ @mysqli_info($mysqli), gettype(@mysqli_info($mysqli)));
+
+ assert(@mysqli_thread_id($mysqli) > @$mysqli->thread_id);
+ assert(gettype(@$mysqli->thread_id) == gettype(@mysqli_thread_id($mysqli)));
+ printf("mysqli->thread_id = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->thread_id, gettype(@$mysqli->thread_id),
+ @mysqli_thread_id($mysqli), gettype(@mysqli_thread_id($mysqli)));
+
+ assert(@mysqli_get_proto_info($mysqli) === @$mysqli->protocol_version);
+ printf("mysqli->protocol_version = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->protocol_version, gettype(@$mysqli->protocol_version),
+ @mysqli_get_proto_info($mysqli), gettype(@mysqli_get_proto_info($mysqli)));
+
+ assert(@mysqli_get_server_info($mysqli) === @$mysqli->server_info);
+ printf("mysqli->server_info = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->server_info, gettype(@$mysqli->server_info),
+ @mysqli_get_server_info($mysqli), gettype(@mysqli_get_server_info($mysqli)));
+
+ assert(@mysqli_get_server_version($mysqli) === @$mysqli->server_version);
+ printf("mysqli->server_version = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->server_version, gettype(@$mysqli->server_version),
+ @mysqli_get_server_version($mysqli), gettype(@mysqli_get_server_version($mysqli)));
+
+ assert(@mysqli_warning_count($mysqli) === @$mysqli->warning_count);
+ printf("mysqli->warning_count = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->warning_count, gettype(@$mysqli->warning_count),
+ @mysqli_warning_count($mysqli), gettype(@mysqli_warning_count($mysqli)));
+
+ printf("\nAccess to undefined properties:\n");
+ printf("mysqli->unknown = '%s'\n", @$mysqli->unknown);
+
+ @$mysqli->unknown = 13;
+ printf("setting mysqli->unknown, @mysqli_unknown = '%s'\n", @$mysqli->unknown);
+
+ $unknown = 'friday';
+ @$mysqli->unknown = $unknown;
+ printf("setting mysqli->unknown, @mysqli_unknown = '%s'\n", @$mysqli->unknown);
+
+ 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",
+ @$mysqli->connect_error, gettype(@$mysqli->connect_error),
+ @mysqli_connect_error(), gettype(@mysqli_connect_error()));
+
+ assert(@mysqli_connect_errno() === @$mysqli->connect_errno);
+ printf("mysqli->connect_errno = '%s'/%s ('%s'/%s)\n",
+ @$mysqli->connect_errno, gettype(@$mysqli->connect_errno),
+ @mysqli_connect_errno(), gettype(@mysqli_connect_errno()));
+ }
+
+ printf("Without RS\n");
+ $mysqli = @new mysqli($host, $user, $passwd . "invalid", $db, $port, $socket);
+ dump_properties($mysqli);
+
+ printf("With RS\n");
+ $mysqli = @new mysqli($host, $user, $passwd . "invalid", $db, $port, $socket);
+ $res = @$mysqli->query("SELECT * FROM test");
+ dump_properties($mysqli);
+
+ print "done!";
+?>
+--CLEAN--
+<?php require_once("clean_table.inc"); ?>
+--EXPECTF--
+Without RS
+
+Class variables:
+affected_rows = 'NULL'
+client_info = 'NULL'
+client_version = '%s'
+connect_errno = '%s'
+connect_error = ''%s'
+errno = 'NULL'
+error = 'NULL'
+field_count = 'NULL'
+host_info = 'NULL'
+info = 'NULL'
+insert_id = 'NULL'
+protocol_version = 'NULL'
+server_info = 'NULL'
+server_version = 'NULL'
+sqlstate = 'NULL'
+thread_id = 'NULL'
+warning_count = 'NULL'
+
+Object variables:
+affected_rows = 'NULL'
+client_info = 'NULL'
+client_version = '%s'
+connect_errno = '%s'
+connect_error = '%s'
+errno = 'NULL'
+error = 'NULL'
+field_count = 'NULL'
+host_info = 'NULL'
+info = 'NULL'
+insert_id = 'NULL'
+server_info = 'NULL'
+server_version = 'NULL'
+sqlstate = 'NULL'
+protocol_version = 'NULL'
+thread_id = 'NULL'
+warning_count = 'NULL'
+
+Magic, magic properties:
+mysqli->affected_rows = ''/NULL (''/NULL)
+
+Warning: assert(): Assertion failed in %s on line %d
+mysqli->client_info = ''/NULL ('%s'/%s)
+mysqli->client_version = '%s'/integer ('%s'/integer)
+mysqli->errno = ''/NULL (''/NULL)
+mysqli->error = ''/NULL (''/NULL)
+mysqli->field_count = ''/NULL (''/NULL)
+mysqli->insert_id = ''/NULL (''/NULL)
+mysqli->sqlstate = ''/NULL (''/NULL)
+mysqli->host_info = ''/NULL (''/NULL)
+mysqli->info = ''/NULL (''/NULL)
+
+Warning: assert(): Assertion failed in %s on line %d
+mysqli->thread_id = ''/NULL (''/NULL)
+mysqli->protocol_version = ''/NULL (''/NULL)
+mysqli->server_info = ''/NULL (''/NULL)
+mysqli->server_version = ''/NULL (''/NULL)
+mysqli->warning_count = ''/NULL (''/NULL)
+
+Access to undefined properties:
+mysqli->unknown = ''
+setting mysqli->unknown, @mysqli_unknown = '13'
+setting mysqli->unknown, @mysqli_unknown = 'friday'
+
+Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
+mysqli->connect_error = '%s'/%s)
+mysqli->connect_errno = '%s'/integer ('%s'/integer)
+With RS
+
+Class variables:
+affected_rows = 'NULL'
+client_info = 'NULL'
+client_version = '%s'
+connect_errno = '%s'
+connect_error = '%s'
+errno = 'NULL'
+error = 'NULL'
+field_count = 'NULL'
+host_info = 'NULL'
+info = 'NULL'
+insert_id = 'NULL'
+protocol_version = 'NULL'
+server_info = 'NULL'
+server_version = 'NULL'
+sqlstate = 'NULL'
+thread_id = 'NULL'
+warning_count = 'NULL'
+
+Object variables:
+affected_rows = 'NULL'
+client_info = 'NULL'
+client_version = '%s'
+connect_errno = '%s'
+connect_error = '%s'
+errno = 'NULL'
+error = 'NULL'
+field_count = 'NULL'
+host_info = 'NULL'
+info = 'NULL'
+insert_id = 'NULL'
+server_info = 'NULL'
+server_version = 'NULL'
+sqlstate = 'NULL'
+protocol_version = 'NULL'
+thread_id = 'NULL'
+warning_count = 'NULL'
+
+Magic, magic properties:
+mysqli->affected_rows = ''/NULL (''/NULL)
+
+Warning: assert(): Assertion failed in %s on line %d
+mysqli->client_info = ''/NULL ('%s'/%s)
+mysqli->client_version = '%s'/integer ('%s'/integer)
+mysqli->errno = ''/NULL (''/NULL)
+mysqli->error = ''/NULL (''/NULL)
+mysqli->field_count = ''/NULL (''/NULL)
+mysqli->insert_id = ''/NULL (''/NULL)
+mysqli->sqlstate = ''/NULL (''/NULL)
+mysqli->host_info = ''/NULL (''/NULL)
+mysqli->info = ''/NULL (''/NULL)
+
+Warning: assert(): Assertion failed in %s on line %d
+mysqli->thread_id = ''/NULL (''/NULL)
+mysqli->protocol_version = ''/NULL (''/NULL)
+mysqli->server_info = ''/NULL (''/NULL)
+mysqli->server_version = ''/NULL (''/NULL)
+mysqli->warning_count = ''/NULL (''/NULL)
+
+Access to undefined properties:
+mysqli->unknown = ''
+setting mysqli->unknown, @mysqli_unknown = '13'
+setting mysqli->unknown, @mysqli_unknown = 'friday'
+
+Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
+mysqli->connect_error = '%s'/%s)
+mysqli->connect_errno = '%s'/integer ('%s'/integer)
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_close.phpt b/ext/mysqli/tests/mysqli_close.phpt
index 713c6e157..c6ac92dd6 100644
--- a/ext/mysqli/tests/mysqli_close.phpt
+++ b/ext/mysqli/tests/mysqli_close.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_close_oo.phpt b/ext/mysqli/tests/mysqli_close_oo.phpt
index c3d6a9397..be67f779a 100644
--- a/ext/mysqli/tests/mysqli_close_oo.phpt
+++ b/ext/mysqli/tests/mysqli_close_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt
index 6a3c1e86c..66113b3a5 100644
--- a/ext/mysqli/tests/mysqli_commit.phpt
+++ b/ext/mysqli/tests/mysqli_commit.phpt
@@ -25,7 +25,7 @@ if ($row[1] == "DISABLED" || $row[1] == "NO") {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt
index 8d072999c..fee796739 100644
--- a/ext/mysqli/tests/mysqli_commit_oo.phpt
+++ b/ext/mysqli/tests/mysqli_commit_oo.phpt
@@ -24,7 +24,7 @@ if ($row[1] == "DISABLED" || $row[1] == "NO") {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_connect.phpt b/ext/mysqli/tests/mysqli_connect.phpt
index dd2792f81..cf7c7bede 100644
--- a/ext/mysqli/tests/mysqli_connect.phpt
+++ b/ext/mysqli/tests/mysqli_connect.phpt
@@ -5,7 +5,7 @@ mysqli_connect()
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_connect_errno.phpt b/ext/mysqli/tests/mysqli_connect_errno.phpt
index b48a75ef8..a7f90f152 100644
--- a/ext/mysqli/tests/mysqli_connect_errno.phpt
+++ b/ext/mysqli/tests/mysqli_connect_errno.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_connect_error.phpt b/ext/mysqli/tests/mysqli_connect_error.phpt
index e65dc0eb0..79ac3f1f7 100644
--- a/ext/mysqli/tests/mysqli_connect_error.phpt
+++ b/ext/mysqli/tests/mysqli_connect_error.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -21,8 +21,8 @@ require_once('skipifconnectfailure.inc');
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);
- if ('' !== ($tmp = mysqli_connect_error()))
- printf("[003] Expecting string/'', got %s/%s\n", gettype($tmp), $tmp);
+ if (NULL !== ($tmp = mysqli_connect_error()))
+ printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
diff --git a/ext/mysqli/tests/mysqli_connect_oo.phpt b/ext/mysqli/tests/mysqli_connect_oo.phpt
index 63660fd2b..d406e2484 100644
--- a/ext/mysqli/tests/mysqli_connect_oo.phpt
+++ b/ext/mysqli/tests/mysqli_connect_oo.phpt
@@ -5,7 +5,7 @@ new mysqli()
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
index ec5d1014c..2636abdfd 100644
--- a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
+++ b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
@@ -5,11 +5,15 @@ new mysqli()
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
- ini_set('mysqli.default_socket', 'socket');
+
+ if ($socket != "")
+ /* mysqli.default_socket requires non-empty string */
+ ini_set('mysqli.default_socket', 'socket');
+
ini_set('mysqli.default_port', 9999);
ini_set('mysqli.default_pw', 'password');
ini_set('mysqli.default_user', 'user');
@@ -18,21 +22,28 @@ new mysqli()
mysqli_report(MYSQLI_REPORT_OFF);
mysqli_report(MYSQLI_REPORT_STRICT);
- ini_set('mysqli.default_socket', $socket);
- try {
- $mysqli = mysqli_init();
- $mysqli->real_connect($host, $user, $passwd, $db, $port);
+ if ($socket != "") {
+ ini_set('mysqli.default_socket', $socket);
+ try {
+ $mysqli = mysqli_init();
+ $mysqli->real_connect($host, $user, $passwd, $db, $port);
- if (!$res = $mysqli->query("SELECT 'mysqli.default_socket' AS testing"))
- printf("[001] [%d] %s\n", $mysqli->errno, $mysqli->error);
- var_dump($res->fetch_assoc());
- $res->free_result();
+ if (!$res = $mysqli->query("SELECT 'mysqli.default_socket' AS testing"))
+ printf("[001] [%d] %s\n", $mysqli->errno, $mysqli->error);
+ $tmp = $res->fetch_assoc();
+ $res->free_result();
- $mysqli->close();
+ if (!isset($tmp['testing']) || $tmp['testing'] != $socket) {
+ printf("[002] mysqli.default_socket not properly set?\n");
+ var_dump($tmp);
+ }
- } catch (mysqli_sql_exception $e) {
- printf("%s\n", $e->getMessage());
- printf("[002] Usage of mysqli.default_socket failed\n");
+ $mysqli->close();
+
+ } catch (mysqli_sql_exception $e) {
+ printf("%s\n", $e->getMessage());
+ printf("[002] Usage of mysqli.default_socket failed\n");
+ }
}
ini_set('mysqli.default_port', $port);
@@ -145,10 +156,6 @@ new mysqli()
--EXPECTF--
array(1) {
[%u|b%"testing"]=>
- %unicode|string%(21) "mysqli.default_socket"
-}
-array(1) {
- [%u|b%"testing"]=>
%unicode|string%(19) "mysqli.default_port"
}
array(1) {
diff --git a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt
index 1c2defc8b..5ede44591 100644
--- a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt
+++ b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt
@@ -12,7 +12,7 @@ new mysqli()
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$myhost = 'invalidhost';
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_connect_twice.phpt b/ext/mysqli/tests/mysqli_connect_twice.phpt
index 7c6a726b2..a9d5b7ec9 100644
--- a/ext/mysqli/tests/mysqli_connect_twice.phpt
+++ b/ext/mysqli/tests/mysqli_connect_twice.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt
index 23f577221..32a259350 100644
--- a/ext/mysqli/tests/mysqli_constants.phpt
+++ b/ext/mysqli/tests/mysqli_constants.phpt
@@ -117,7 +117,9 @@ require_once('skipifconnectfailure.inc');
if (($version > 51122 && $version < 60000) || ($version > 60003) || $IS_MYSQLND) {
$expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true;
}
- if ($version > 60005 || $IS_MYSQLND) {
+
+ /* First introduced in MySQL 6.0, backported to MySQL 5.5 */
+ if ($version >= 50500 || $IS_MYSQLND) {
$expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true;
}
diff --git a/ext/mysqli/tests/mysqli_data_seek.phpt b/ext/mysqli/tests/mysqli_data_seek.phpt
index cb54c8003..9e2d65047 100644
--- a/ext/mysqli/tests/mysqli_data_seek.phpt
+++ b/ext/mysqli/tests/mysqli_data_seek.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_data_seek_oo.phpt b/ext/mysqli/tests/mysqli_data_seek_oo.phpt
index e75a04f36..0858218a4 100644
--- a/ext/mysqli/tests/mysqli_data_seek_oo.phpt
+++ b/ext/mysqli/tests/mysqli_data_seek_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt b/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt
index 79f081f50..9814c6e25 100644
--- a/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt
+++ b/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt
@@ -12,7 +12,7 @@ if (!function_exists('mysqli_disable_reads_from_master')) {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_driver.phpt b/ext/mysqli/tests/mysqli_driver.phpt
index a2d1437a2..4e266a053 100644
--- a/ext/mysqli/tests/mysqli_driver.phpt
+++ b/ext/mysqli/tests/mysqli_driver.phpt
@@ -8,8 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
- include "table.inc";
+ require("table.inc");
if (!is_object($driver = new mysqli_driver()))
printf("[001] Failed to create mysqli_driver object\n");
diff --git a/ext/mysqli/tests/mysqli_dump_debug_info.phpt b/ext/mysqli/tests/mysqli_dump_debug_info.phpt
index fe253e1cf..bd87ddf0c 100644
--- a/ext/mysqli/tests/mysqli_dump_debug_info.phpt
+++ b/ext/mysqli/tests/mysqli_dump_debug_info.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
index 1d334f95d..82edef561 100644
--- a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
+++ b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_embedded_connect.phpt b/ext/mysqli/tests/mysqli_embedded_connect.phpt
index 5ee5fa76a..37891f55e 100644
--- a/ext/mysqli/tests/mysqli_embedded_connect.phpt
+++ b/ext/mysqli/tests/mysqli_embedded_connect.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_embedded_connect()
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifnotemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt b/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt
index 171ed5650..e23ddd167 100644
--- a/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt
+++ b/ext/mysqli/tests/mysqli_enable_reads_from_master.phpt
@@ -12,7 +12,7 @@ if (!function_exists('mysqli_enable_reads_from_master')) {
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_errno.phpt b/ext/mysqli/tests/mysqli_errno.phpt
index 48acbb623..0e9f0496a 100644
--- a/ext/mysqli/tests/mysqli_errno.phpt
+++ b/ext/mysqli/tests/mysqli_errno.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_errno_oo.phpt b/ext/mysqli/tests/mysqli_errno_oo.phpt
index 032f70a87..bef4a607e 100644
--- a/ext/mysqli/tests/mysqli_errno_oo.phpt
+++ b/ext/mysqli/tests/mysqli_errno_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_error.phpt b/ext/mysqli/tests/mysqli_error.phpt
index 517388045..5e70d59d4 100644
--- a/ext/mysqli/tests/mysqli_error.phpt
+++ b/ext/mysqli/tests/mysqli_error.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_error_oo.phpt b/ext/mysqli/tests/mysqli_error_oo.phpt
index 456f8f9a3..31716d9aa 100644
--- a/ext/mysqli/tests/mysqli_error_oo.phpt
+++ b/ext/mysqli/tests/mysqli_error_oo.phpt
@@ -1,14 +1,14 @@
--TEST--
$mysqli->error
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_error_unicode.phpt b/ext/mysqli/tests/mysqli_error_unicode.phpt
index 8789f89e8..b59ed5f60 100644
--- a/ext/mysqli/tests/mysqli_error_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_error_unicode.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt
index 26401e7cc..eacecc92d 100644
--- a/ext/mysqli/tests/mysqli_fetch_all.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_all.phpt
@@ -10,7 +10,7 @@ if (!function_exists('mysqli_fetch_all'))
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt
index 297d92ac7..a71eb2bce 100644
--- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt
@@ -11,7 +11,7 @@ if (!function_exists('mysqli_fetch_all'))
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt
index f43804d96..cff314166 100644
--- a/ext/mysqli/tests/mysqli_fetch_array.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt
index d85eb9e6f..957ca12de 100644
--- a/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 5")) {
diff --git a/ext/mysqli/tests/mysqli_fetch_array_large.phpt b/ext/mysqli/tests/mysqli_fetch_array_large.phpt
index aa8c76871..25c00baad 100644
--- a/ext/mysqli/tests/mysqli_fetch_array_large.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array_large.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
function mysqli_fetch_array_large($offset, $link, $package_size) {
@@ -19,53 +19,57 @@ require_once('skipifconnectfailure.inc');
$sql .= sprintf("('%s'), ", $random_char);
$sql = substr($sql, 0, -2);
- assert(strlen($sql) < $package_size);
+ $len = strlen($sql);
+ assert($len < $package_size);
if (!@mysqli_query($link, $sql)) {
- if (1153 == mysqli_errno($link) || stristr(mysqli_error($link), 'max_allowed_packet'))
- /* [1153] Got a packet bigger than 'max_allowed_packet' bytes */
+ if (1153 == mysqli_errno($link) || 2006 == mysqli_errno($link) || stristr(mysqli_error($link), 'max_allowed_packet'))
+ /*
+ myslqnd - [1153] Got a packet bigger than 'max_allowed_packet' bytes
+ libmysql -[2006] MySQL server has gone away
+ */
return false;
- printf("[%03d + 1] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
+ printf("[%03d + 1] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link));
return false;
}
/* buffered result set - let's hope we do not run into PHP memory limit... */
if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
- printf("[%03d + 2] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
+ printf("[%03d + 2] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link));
return false;
}
while ($row = mysqli_fetch_assoc($res)) {
if ($row['label'] != $random_char) {
- printf("[%03d + 3] Wrong results - expecting '%s' got '%s', [%d] %s\n",
- $offset, $random_char, $row['label'], mysqli_errno($link), mysqli_error($link));
+ printf("[%03d + 3] Wrong results - expecting '%s' got '%s', len = %d, [%d] %s\n",
+ $offset, $random_char, $row['label'], $len, mysqli_errno($link), mysqli_error($link));
return false;
}
}
mysqli_free_result($res);
if (!$stmt = mysqli_prepare($link, "SELECT id, label FROM test")) {
- printf("[%03d + 4] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
+ printf("[%03d + 4] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link));
return false;
}
/* unbuffered result set */
if (!mysqli_stmt_execute($stmt)) {
- printf("[%03d + 5] [%d] %s\n", $offset, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+ printf("[%03d + 5] len = %d, [%d] %s, [%d] %s\n", $offset, $len, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt), mysqli_errno($link), mysqli_error($link));
return false;
}
$id = $label = NULL;
if (!mysqli_stmt_bind_result($stmt, $id, $label)) {
- printf("[%03d + 6] [%d] %s\n", $offset, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+ printf("[%03d + 6] len = %d, [%d] %s, [%d] %s\n", $offset, $len, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt), mysqli_errno($link), mysqli_error($link));
return false;
}
while (mysqli_stmt_fetch($stmt)) {
if ($label != $random_char) {
- printf("[%03d + 7] Wrong results - expecting '%s' got '%s', [%d] %s\n",
- $offset, $random_char, $label, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+ printf("[%03d + 7] Wrong results - expecting '%s' got '%s', len = %d, [%d] %s\n",
+ $offset, $random_char, $label, $len, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
return false;
}
}
diff --git a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt
index c9ed7ccac..82e4d7b66 100644
--- a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require("table.inc");
// do as much as we can do in 5 seconds
diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt
index fcabb5903..78c21308f 100644
--- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt
index 6aaed3eb1..edf143b72 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt
index fa60582c4..a273b73aa 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$res = mysqli_query($link, "SELECT 1, 2")) {
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt
index 18d60c4b6..fa00ecda1 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt
@@ -5,7 +5,7 @@ mysqli_fetch_assoc() - utf8
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
- require('connect.inc');
+ require_once("connect.inc");
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
die("skip Cannot connect to server to check charsets");
@@ -35,7 +35,6 @@ mysqli_fetch_assoc() - utf8
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
/* some cyrillic (utf8) comes here */
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
index e9a746ec0..8a71fa740 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt
index dba9f2f55..e90599257 100644
--- a/ext/mysqli/tests/mysqli_fetch_field.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
index 5b4dc5671..33c5a0cf3 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
index f1075139e..23d46f309 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
index 6f1cea20c..42cbc1487 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
@@ -17,7 +17,7 @@ mysqli_close($link);
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/* TODO: mysqli.c needs to export a few more constants - see all the defined() calls! */
@@ -144,7 +144,7 @@ mysqli_close($link);
case 'TIMESTAMP NOT NULL':
// http://bugs.mysql.com/bug.php?id=30081 - new flag introduced in 5.1.24/6.0.4
$version = mysqli_get_server_version($link);
- if ((($version > 50122) && ($version < 60000)) ||
+ if ((($version > 50122) && ($version < 60000) && ($version != 50200)) ||
($version >= 60004)) {
// new flag ON_UPDATE_NOW_FLAG (8192)
$expected_flags .= ' ON_UPDATE_NOW';
@@ -165,7 +165,7 @@ mysqli_close($link);
case 'BIT':
$version = mysqli_get_server_version($link);
- if ($version <= 50105) {
+ if (($version <= 50114 && $version > 50100) || ($version == 50200)) {
// TODO - check exact version!
$expected_flags = trim(str_replace('UNSIGNED', '', $expected_flags));
}
@@ -176,8 +176,8 @@ mysqli_close($link);
list($missing_flags, $unexpected_flags, $flags_found) = checkFlags($field->flags, $expected_flags, $flags);
if ($unexpected_flags) {
- printf("[006] Found unexpected flags '%s' for %s, found '%s'\n",
- $unexpected_flags, $column_def, $flags_found);
+ printf("[006] Found unexpected flags '%s' for %s, found '%s' with MySQL %s'\n",
+ $unexpected_flags, $column_def, $flags_found, mysqli_get_server_version($link));
}
if ($missing_flags) {
printf("[007] The flags '%s' have not been reported for %s, found '%s'\n",
diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
index 2c169ed3f..f7dcd9b9a 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_field_types.phpt b/ext/mysqli/tests/mysqli_fetch_field_types.phpt
index ae18f0ca6..5d7e5ebc8 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_types.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_types.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
function mysqli_field_datatypes($link, $sql_type, $php_value, $php_type, $datatypes) {
diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt
index 0acec5477..a87956de1 100644
--- a/ext/mysqli/tests/mysqli_fetch_fields.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_lengths.phpt b/ext/mysqli/tests/mysqli_fetch_lengths.phpt
index 71c234922..1abc61170 100644
--- a/ext/mysqli/tests/mysqli_fetch_lengths.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_lengths.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[001] Cannot connect\n");
diff --git a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt
index ef7d7622f..7523621a3 100644
--- a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[001] Cannot connect\n");
diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt
index fc7efe4b2..2fa80cfa9 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt
index c76742226..c8e2b8508 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 5")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
index 10b39e2ec..3b263e49e 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt
index bb44fd418..e0359e058 100644
--- a/ext/mysqli/tests/mysqli_fetch_row.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_row.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_field_count.phpt b/ext/mysqli/tests/mysqli_field_count.phpt
index 5c63b86f6..9a778c94c 100644
--- a/ext/mysqli/tests/mysqli_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_field_count.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt
index 9d17f1a75..58692a620 100644
--- a/ext/mysqli/tests/mysqli_field_seek.phpt
+++ b/ext/mysqli/tests/mysqli_field_seek.phpt
@@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc');
return $ret;
}
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt
index 9609a7c5d..f1e43c491 100644
--- a/ext/mysqli/tests/mysqli_field_tell.phpt
+++ b/ext/mysqli/tests/mysqli_field_tell.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_fork.phpt b/ext/mysqli/tests/mysqli_fork.phpt
index 7e5aac928..6c5096f37 100644
--- a/ext/mysqli/tests/mysqli_fork.phpt
+++ b/ext/mysqli/tests/mysqli_fork.phpt
@@ -32,7 +32,6 @@ if ($row[1] == "DISABLED" || $row[1] == "NO") {
?>
--FILE--
<?php
- require_once("connect.inc");
require_once("table.inc");
$res = mysqli_query($link, "SELECT 'dumped by the parent' AS message");
@@ -236,7 +235,7 @@ if ($row[1] == "DISABLED" || $row[1] == "NO") {
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_free_result.phpt b/ext/mysqli/tests/mysqli_free_result.phpt
index 145435358..a065e1482 100644
--- a/ext/mysqli/tests/mysqli_free_result.phpt
+++ b/ext/mysqli/tests/mysqli_free_result.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$db = 'test';
$tmp = NULL;
diff --git a/ext/mysqli/tests/mysqli_get_cache_stats.phpt b/ext/mysqli/tests/mysqli_get_cache_stats.phpt
deleted file mode 100644
index d49e399bb..000000000
--- a/ext/mysqli/tests/mysqli_get_cache_stats.phpt
+++ /dev/null
@@ -1,116 +0,0 @@
---TEST--
-mysqli_get_cache_stats()
---XFAIL--
-zval caching has been temporarily disabled for the 5.3.0 release
---INI--
-mysqlnd.collect_statistics="1"
-mysqlnd.collect_memory_statistics="1"
---SKIPIF--
-<?PHP
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_get_cache_stats')) {
- die("skip only available with mysqlnd");
-}
-?>
---FILE--
-<?php
- $tmp = $link = null;
- if (!is_null($tmp = @mysqli_get_cache_stats($link)))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- include "connect.inc";
-
- if (!is_array($info = mysqli_get_cache_stats()) || empty($info))
- printf("[002] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
-
- var_dump($info);
-
- if ($info["size"] !== $info['free_items'])
- printf("[003] Unused cache should have size (%d) == free_items (%d)\n",
- $info["size"], $info['free_items']);
-
- require_once('table.inc');
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[004] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if ($info['size'] !== $new_info['size'])
- printf("[005] Cache size should not have changes! Expecting int/%d, got %s/%d\n",
- $info['size'], gettype($new_info['size']), $new_info['size']);
-
- if (count($info) != count($new_info)) {
- printf("[006] Both arrays should have the same number of entries\n");
- var_dump($info);
- var_dump($new_info);
- }
-
- if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (!is_object($res = mysqli_use_result($link)))
- printf("[008] Expecting object, got %s/%s. [%d] %s\n",
- gettype($res), $res, mysqli_errno($link), mysqli_error($link));
-
- if (!$row = mysqli_fetch_assoc($res))
- printf("[009] There should be at least one row in the test table for this test, [%d] %s\n",
- mysqli_errno($link), mysqli_error($link));
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[010] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if ($new_info['get_hits'] <= $info['get_hits'])
- printf("[011] get_hits should have increased, %d (new) <= %d (old)!\n",
- $new_info['get_hits'], $info['get_hits']);
-
- if (!$row = mysqli_fetch_assoc($res))
- printf("[012] There should be two rows in the test table for this test, [%d] %s\n",
- mysqli_errno($link), mysqli_error($link));
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[013] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if ($new_info['put_misses'] <= $info['put_misses'])
- printf("[014] put_misses should have increased, %d (new) <= %d (old)!\n",
- $new_info['put_misses'], $info['put_misses']);
-
- if ($new_info['references'] < $info['references'] + 2)
- printf("[015] reference counter should have increased, %d (new) < %d + 2 (old)!\n",
- $new_info['references'], $info['references']);
-
- unset($row);
- mysqli_free_result($res);
-
- if (!is_array($info = mysqli_get_cache_stats()) || empty($info))
- printf("[016] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
-
- if ($info['free_items'] <= $new_info['free_items'])
- printf("[017] Looks like cached entries never get free'd.\n");
-
- mysqli_close($link);
-
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-array(7) {
- [%u|b%"put_hits"]=>
- int(0)
- [%u|b%"put_misses"]=>
- int(0)
- [%u|b%"get_hits"]=>
- int(0)
- [%u|b%"get_misses"]=>
- int(0)
- [%u|b%"size"]=>
- int(%d)
- [%u|b%"free_items"]=>
- int(%d)
- [%u|b%"references"]=>
- int(%d)
-}
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt b/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt
deleted file mode 100644
index 0bb90fa71..000000000
--- a/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt
+++ /dev/null
@@ -1,99 +0,0 @@
---TEST--
-mysqli_get_cache_stats() - freeing for buffered result sets
---XFAIL--
-zval caching has been temporarily disabled for the 5.3.0 release
---INI--
-mysqlnd.collect_statistics="1"
-mysqlnd.collect_memory_statistics="1"
---SKIPIF--
-<?PHP
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_get_cache_stats')) {
- die("skip only available with mysqlnd");
-}
-?>
---FILE--
-<?php
- include "connect.inc";
- require_once('table.inc');
-
- if (!is_array($info = mysqli_get_cache_stats()) || empty($info))
- printf("[001] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
-
- if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- $rows = array();
- while ($rows[] = mysqli_fetch_assoc($res))
- ;
- mysqli_free_result($res);
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[003] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if ($new_info['free_items'] >= $info['free_items']) {
- printf("[004] mysqli_free_result() should not yet have free slots again, because \$rows still exists\n");
- var_dump($info);
- var_dump($new_info);
- }
-
- /* nothing should change because GC will happen some time after free_result */
- unset($rows);
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[005] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if (defined("WE_HAVE_GARBAGE_COLLECTOR_TO_FREE_AFTER_ON_UNSET_AFTER_FREE_RESULT")) {
- /*
- For now we can't reclaim the slots after the free_result is called.
- unset() should happen before free_result().
- */
- if ($new_info['free_items'] < $info['free_items']) {
- printf("[006] \$rows has been unset, free item count should be back to the original value\n");
- var_dump($info);
- var_dump($new_info);
- }
- } else {
- /* We have to reset $info */
- $info = mysqli_get_cache_stats();
- }
-
- if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- $rows = array();
- while ($rows[] = mysqli_fetch_assoc($res))
- ;
- unset($rows);
- mysqli_free_result($res);
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[008] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if ($new_info['free_items'] < $info['free_items']) {
- printf("[009] \$rows has been unset, mysqli_free_result() has been called, free item count should be back to the original value\n");
- var_dump($info);
- var_dump($new_info);
- }
-
- mysqli_close($link);
-
- if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info))
- printf("[010] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);
-
- if ($new_info['free_items'] < $info['free_items']) {
- printf("[011] connection has been closed, free item count should be back to the original value\n");
- var_dump($info);
- var_dump($new_info);
- }
-
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_get_charset.phpt b/ext/mysqli/tests/mysqli_get_charset.phpt
index 314853dc0..8f81b3342 100644
--- a/ext/mysqli/tests/mysqli_get_charset.phpt
+++ b/ext/mysqli/tests/mysqli_get_charset.phpt
@@ -10,7 +10,7 @@ if (!function_exists('mysqli_get_charset'))
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_get_client_info.phpt b/ext/mysqli/tests/mysqli_get_client_info.phpt
index c927231aa..bb3f5cc1f 100644
--- a/ext/mysqli/tests/mysqli_get_client_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_client_info.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_get_client_info()
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!is_string($info = mysqli_get_client_info()) || ('' === $info))
printf("[001] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt
index ed75f7bc5..74c0cc800 100644
--- a/ext/mysqli/tests/mysqli_get_client_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt
@@ -84,7 +84,7 @@ mysqlnd.collect_memory_statistics=1
if (!is_null($tmp = @mysqli_get_client_stats($link)))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- include "connect.inc";
+ require_once("connect.inc");
if (!is_array($info = mysqli_get_client_stats()) || empty($info))
printf("[002] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
@@ -862,7 +862,7 @@ mysqlnd.collect_memory_statistics=1
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
@@ -887,7 +887,7 @@ if (!mysqli_query($link, "DROP SERVER IF EXISTS myself"))
mysqli_close($link);
?>
--EXPECTF--
-array(121) {
+array(152) {
[%u|b%"bytes_sent"]=>
%unicode|string%(1) "0"
[%u|b%"bytes_received"]=>
@@ -974,6 +974,10 @@ array(121) {
%unicode|string%(1) "0"
[%u|b%"rows_fetched_from_client_ps_cursor"]=>
%unicode|string%(1) "0"
+ [%u|b%"rows_affected_normal"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"rows_affected_ps"]=>
+ %unicode|string%(1) "0"
[%u|b%"rows_skipped_normal"]=>
%unicode|string%(1) "0"
[%u|b%"rows_skipped_ps"]=>
@@ -1130,6 +1134,64 @@ array(121) {
%unicode|string%(1) "0"
[%u|b%"init_command_failed_count"]=>
%unicode|string%(1) "0"
+ [%u|b%"com_quit"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_init_db"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_query"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_field_list"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_create_db"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_drop_db"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_refresh"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_shutdown"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_statistics"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_process_info"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_connect"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_process_kill"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_debug"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_ping"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_time"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_delayed_insert"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_change_user"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_binlog_dump"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_table_dump"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_connect_out"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_register_slave"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_prepare"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_execute"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_send_long_data"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_close"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_reset"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_set_option"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_stmt_fetch"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"com_deamon"]=>
+ %unicode|string%(1) "0"
}
Testing buffered normal...
Testing buffered normal... - SELECT id, label FROM test
diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
index 698a4684f..64eba1667 100644
--- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
@@ -21,8 +21,7 @@ if (!function_exists('mysqli_get_connection_stats')) {
if (!is_null($tmp = @mysqli_get_connection_stats($link)))
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- include "connect.inc";
- include "table.inc";
+ require("table.inc");
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
printf("[003] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
@@ -63,7 +62,7 @@ if (!function_exists('mysqli_get_connection_stats')) {
}
mysqli_close($link);
- include "table.inc";
+ require("table.inc");
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
printf("[008] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt
index 63fdad28b..2c3c0f806 100644
--- a/ext/mysqli/tests/mysqli_get_host_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_host_info.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!is_null($tmp = @mysqli_get_host_info()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
@@ -20,6 +20,11 @@ require_once('skipifconnectfailure.inc');
if (!is_string($info = mysqli_get_host_info($link)) || ('' === $info))
printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
+ if ($IS_MYSQLND && $host != 'localhost' && $host != '127.0.0.1' && $port != '' && $host != "" && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
+ /* this should be a TCP/IP connection and not a Unix Socket (or SHM or Named Pipe) */
+ if (!stristr($info, "TCP/IP"))
+ printf("[004] Should be a TCP/IP connection but mysqlnd says '%s'\n", $info);
+ }
print "done!";
?>
--CLEAN--
diff --git a/ext/mysqli/tests/mysqli_get_proto_info.phpt b/ext/mysqli/tests/mysqli_get_proto_info.phpt
index b5dd98518..7fbefeb85 100644
--- a/ext/mysqli/tests/mysqli_get_proto_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_proto_info.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_get_proto_info()
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
-require_once('skipifemb.inc');
+require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!is_null($tmp = @mysqli_get_proto_info()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_get_server_info.phpt b/ext/mysqli/tests/mysqli_get_server_info.phpt
index f10cc4cfa..a7f785302 100644
--- a/ext/mysqli/tests/mysqli_get_server_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_server_info.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!is_null($tmp = @mysqli_get_server_info()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_get_server_version.phpt b/ext/mysqli/tests/mysqli_get_server_version.phpt
index a97c9a23b..b30c4a380 100644
--- a/ext/mysqli/tests/mysqli_get_server_version.phpt
+++ b/ext/mysqli/tests/mysqli_get_server_version.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_get_server_version()
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!is_null($tmp = @mysqli_get_server_version()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_get_warnings.phpt b/ext/mysqli/tests/mysqli_get_warnings.phpt
index 1472f297f..00548de70 100644
--- a/ext/mysqli/tests/mysqli_get_warnings.phpt
+++ b/ext/mysqli/tests/mysqli_get_warnings.phpt
@@ -11,7 +11,7 @@ if (!$TEST_EXPERIMENTAL)
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -144,7 +144,7 @@ if (!$TEST_EXPERIMENTAL)
print "done!";
?>
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt
index caa7c9010..2d5004fe6 100644
--- a/ext/mysqli/tests/mysqli_info.phpt
+++ b/ext/mysqli/tests/mysqli_info.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!is_null($tmp = @mysqli_info()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_insert_id.phpt b/ext/mysqli/tests/mysqli_insert_id.phpt
index a5491bf97..549d71d15 100644
--- a/ext/mysqli/tests/mysqli_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_insert_id.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_insert_id_variation.phpt b/ext/mysqli/tests/mysqli_insert_id_variation.phpt
index 1717b309c..e858ca068 100644
--- a/ext/mysqli/tests/mysqli_insert_id_variation.phpt
+++ b/ext/mysqli/tests/mysqli_insert_id_variation.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
-include "connect.inc";
+require_once("connect.inc");
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",
@@ -90,7 +90,7 @@ echo "DONE";
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt
new file mode 100644
index 000000000..725636e14
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt
@@ -0,0 +1,108 @@
+--TEST--
+INSERT and packet overflow
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(sprintf("SKIP [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+
+$max_len = pow(2, 24);
+if (!$res = mysqli_query($link, "SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'"))
+ die(sprintf("SKIP [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
+
+if (!mysqli_query($link, "SET NAMES 'latin1'"))
+ die(sprintf("SKIP [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
+
+mysqli_close($link);
+?>
+--INI--
+memory_limit=256M
+--FILE--
+<?php
+ require('connect.inc');
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
+ if (!$res = mysqli_query($link, "SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'"))
+ printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (!$row = mysqli_fetch_assoc($res))
+ printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ mysqli_free_result($res);
+
+ if (0 === ($org_max_allowed_packet = (int)$row['Value']))
+ printf("[004] Cannot determine max_allowed_packet size and/or bogus max_allowed_packet setting used.\n");
+
+ $max_len = pow(2, 24);
+ if ($org_max_allowed_packet < $max_len) {
+ if (!mysqli_query($link, "SET GLOBAL max_allowed_packet = " . ($max_len + 100)))
+ printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ }
+ mysqli_close($link);
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[006] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
+ if (!mysqli_query($link, "SET NAMES 'latin1'"))
+ printf("[007] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
+ if (!$res = mysqli_query($link, "SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'"))
+ printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (!$row = mysqli_fetch_assoc($res))
+ printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ mysqli_free_result($res);
+
+ if (0 === ($max_allowed_packet = (int)$row['Value']))
+ printf("[010] Cannot determine max_allowed_packet size and/or bogus max_allowed_packet setting used.\n");
+
+ $max_len = pow(2, 24);
+ if ($max_allowed_packet < $max_len) {
+ printf("[011] Failed to change max_allowed_packet");
+ }
+
+ if (!mysqli_query($link, "CREATE TABLE test(col_blob LONGBLOB) ENGINE=" . $engine))
+ printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ $query_prefix = 'INSERT INTO test(col_blob) VALUES ("';
+ $query_postfix = '")';
+ $query_len = strlen($query_prefix) + strlen($query_postfix);
+ $com_query_len = 2;
+
+
+ $blob = str_repeat('a', $max_len - $com_query_len - $query_len);
+ $query = sprintf("%s%s%s", $query_prefix, $blob, $query_postfix);
+
+ if (!mysqli_query($link, $query))
+ printf("[013] max_allowed_packet = %d, strlen(query) = %d, [%d] %s\n", $max_allowed_packet, strlen($query), mysqli_errno($link), mysqli_error($link));
+
+ if (!$res = mysqli_query($link, "SELECT col_blob FROM test"))
+ printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (!$row = mysqli_fetch_assoc($res)) {
+ printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ } else {
+ if ($row['col_blob'] != $blob) {
+ printf("[016] Blob seems wrong, dumping data\n");
+ var_dump(strlen($row['col_blob']));
+ var_dump(strlen($blob));
+ }
+ mysqli_free_result($res);
+ }
+
+ if (!mysqli_query($link, "SET GLOBAL max_allowed_packet = " . $org_max_allowed_packet))
+ printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ mysqli_close($link);
+
+ print "done!";
+?>
+--CLEAN--
+<?php
+ require_once("clean_table.inc");
+?>
+--EXPECTF--
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt
index 64daad88e..5706adf46 100644
--- a/ext/mysqli/tests/mysqli_kill.phpt
+++ b/ext/mysqli/tests/mysqli_kill.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -91,7 +91,7 @@ object(mysqli)#%d (%d) {
[%u|b%"connect_errno"]=>
int(0)
[%u|b%"connect_error"]=>
- %unicode|string%(0) ""
+ NULL
[%u|b%"errno"]=>
int(2006)
[%u|b%"error"]=>
diff --git a/ext/mysqli/tests/mysqli_more_results.phpt b/ext/mysqli/tests/mysqli_more_results.phpt
index 49de0d7fa..271c63e1d 100644
--- a/ext/mysqli/tests/mysqli_more_results.phpt
+++ b/ext/mysqli/tests/mysqli_more_results.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$strict_on = false;
if (defined('E_STRICT')) {
diff --git a/ext/mysqli/tests/mysqli_multi_query.phpt b/ext/mysqli/tests/mysqli_multi_query.phpt
index dd26fd71b..91c07c256 100644
--- a/ext/mysqli/tests/mysqli_multi_query.phpt
+++ b/ext/mysqli/tests/mysqli_multi_query.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$strict_on = false;
if (defined('E_STRICT')) {
diff --git a/ext/mysqli/tests/mysqli_next_result.phpt b/ext/mysqli/tests/mysqli_next_result.phpt
index 0dc49c72f..c36920e1e 100644
--- a/ext/mysqli/tests/mysqli_next_result.phpt
+++ b/ext/mysqli/tests/mysqli_next_result.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$strict_on = false;
if (defined('E_STRICT')) {
diff --git a/ext/mysqli/tests/mysqli_no_reconnect.phpt b/ext/mysqli/tests/mysqli_no_reconnect.phpt
index aa7b1c3b5..0fbc1ffbb 100644
--- a/ext/mysqli/tests/mysqli_no_reconnect.phpt
+++ b/ext/mysqli/tests/mysqli_no_reconnect.phpt
@@ -78,8 +78,19 @@ mysqli.reconnect=0
mysqli_connect_errno(), mysqli_connect_error());
$thread_id_timeout = mysqli_thread_id($link);
- if (!mysqli_query($link, sprintf('KILL %d', $thread_id_timeout)))
- printf("[013] Cannot KILL timeout connection, [%d] %s\n", mysqli_errno($link2), mysqli_error($link2));
+ if ($IS_MYSQLND) {
+ /*
+ mysqlnd is a bit more verbose than libmysql. mysqlnd should print:
+ Warning: mysqli_query(): MySQL server has gone away in %s on line %d
+
+ Warning: mysqli_query(): Error reading result set's header in %d on line %d
+ */
+ if (!@mysqli_query($link, sprintf('KILL %d', $thread_id_timeout)))
+ printf("[013] Cannot KILL timeout connection, [%d] %s\n", mysqli_errno($link2), mysqli_error($link2));
+ } else {
+ if (!mysqli_query($link, sprintf('KILL %d', $thread_id_timeout)))
+ printf("[013] Cannot KILL timeout connection, [%d] %s\n", mysqli_errno($link2), mysqli_error($link2));
+ }
// Give the server a second to really kill the other thread...
sleep(1);
diff --git a/ext/mysqli/tests/mysqli_num_fields.phpt b/ext/mysqli/tests/mysqli_num_fields.phpt
index 88825573c..4c2510af4 100644
--- a/ext/mysqli/tests/mysqli_num_fields.phpt
+++ b/ext/mysqli/tests/mysqli_num_fields.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_num_rows.phpt b/ext/mysqli/tests/mysqli_num_rows.phpt
index f1798cc2c..376ddd4e8 100644
--- a/ext/mysqli/tests/mysqli_num_rows.phpt
+++ b/ext/mysqli/tests/mysqli_num_rows.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt
index 670f9aca7..1da140b39 100644
--- a/ext/mysqli/tests/mysqli_options.phpt
+++ b/ext/mysqli/tests/mysqli_options.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
/*
TODO: ext/mysqli might lack support for those options which are available
@@ -111,6 +111,8 @@ bool(true)
bool(true)
%s(23) "MYSQLI_OPT_LOCAL_INFILE"
bool(true)
+
+Notice: Array to string conversion in %s on line %d
%s(19) "MYSQLI_INIT_COMMAND"
bool(true)
%s(25) "MYSQLI_READ_DEFAULT_GROUP"
diff --git a/ext/mysqli/tests/mysqli_options_init_command.phpt b/ext/mysqli/tests/mysqli_options_init_command.phpt
index 2ba2ce461..a78dfca20 100644
--- a/ext/mysqli/tests/mysqli_options_init_command.phpt
+++ b/ext/mysqli/tests/mysqli_options_init_command.phpt
@@ -10,7 +10,7 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
/* see mysqli.c for details */
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt
new file mode 100644
index 000000000..f40965e59
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt
@@ -0,0 +1,164 @@
+--TEST--
+Calling connect() on an open persistent connection to create a new persistent connection
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+if (!$IS_MYSQLND)
+ die("skip mysqlnd test only");
+
+?>
+--INI--
+mysqli.allow_persistent=1
+mysqli.max_persistent=-1
+mysqli.max_links=-1
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ $phost = 'p:' . $host;
+
+ if (!$link = my_mysqli_connect($phost, $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",
+ $phost, $user, $db, $port, $socket);
+
+ if (!$thread_id = $link->thread_id)
+ printf("[002] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (true !== ($tmp = my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
+ printf("[003] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_int($new_thread_id = mysqli_thread_id($link)) || ($new_thread_id < 0))
+ printf("[004] Expecting int/any got %s/%s\n", gettype($tmp), $tmp);
+
+ if ($thread_id == $new_thread_id)
+ printf("[005] Expecting new connection and new thread id. Old thread id %d, new thread id %d\n", $thread_id, $new_thread_id);
+
+ if (!($res = mysqli_query($link, "SELECT 'ok' AS it_works")) ||
+ !($row = mysqli_fetch_assoc($res)))
+ printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ var_dump($row);
+ mysqli_free_result($res);
+
+ mysqli_close($link);
+
+ if (!$link = new my_mysqli($phost, $user, $passwd, $db, $port, $socket))
+ printf("[007] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $phost, $user, $db, $port, $socket);
+
+ if (!$thread_id = $link->thread_id)
+ printf("[008] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (true !== ($tmp = $link->real_connect($host, $user, $passwd, $db, $port, $socket)))
+ printf("[009] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_int($new_thread_id = $link->thread_id) || ($new_thread_id < 0))
+ printf("[010] Expecting int/any got %s/%s\n", gettype($tmp), $tmp);
+
+ if ($thread_id == $new_thread_id)
+ printf("[011] Expecting new connection and new thread id. Old thread id %d, new thread id %d\n", $thread_id, $new_thread_id);
+
+ if (!($res = $link->query("SELECT 'works also with oo' AS syntax")) ||
+ !($row = $res->fetch_assoc()))
+ printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ var_dump($row);
+ mysqli_free_result($res);
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = $link->connect($phost, $user, $passwd, $db, $port, $socket)))
+ printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!$link = mysqli_connect($phost, $user, $passwd, $db, $port, $socket))
+ printf("[014] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $phost, $user, $db, $port, $socket);
+
+ if (NULL !== ($tmp = $link->connect($host, $user, $passwd, $db, $port, $socket)))
+ printf("[015] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+ printf("Flipping phost/host order\n");
+
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[016] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
+ if (!$thread_id = mysqli_thread_id($link))
+ printf("[017] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (true !== ($tmp = my_mysqli_real_connect($link, $phost, $user, $passwd, $db, $port, $socket)))
+ printf("[018] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_int($new_thread_id = mysqli_thread_id($link)) || ($new_thread_id < 0))
+ printf("[019] Expecting int/any got %s/%s\n", gettype($tmp), $tmp);
+
+ if ($thread_id == $new_thread_id)
+ printf("[020] Expecting new connection and new thread id. Old thread id %d, new thread id %d\n", $thread_id, $new_thread_id);
+
+ if (!($res = mysqli_query($link, "SELECT 'ok' AS it_works")) ||
+ !($row = mysqli_fetch_assoc($res)))
+ printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ var_dump($row);
+ mysqli_free_result($res);
+
+ mysqli_close($link);
+
+ if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
+ printf("[022] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
+ if (!$thread_id = $link->thread_id)
+ printf("[023] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (true !== ($tmp = $link->real_connect($phost, $user, $passwd, $db, $port, $socket)))
+ printf("[024] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_int($new_thread_id = $link->thread_id) || ($new_thread_id < 0))
+ printf("[025] Expecting int/any got %s/%s\n", gettype($tmp), $tmp);
+
+ if ($thread_id == $new_thread_id)
+ printf("[026] Expecting new connection and new thread id. Old thread id %d, new thread id %d\n", $thread_id, $new_thread_id);
+
+ if (!($res = $link->query("SELECT 'works also with oo' AS syntax")) ||
+ !($row = $res->fetch_assoc()))
+ printf("[027] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ var_dump($row);
+ mysqli_free_result($res);
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = $link->connect($host, $user, $passwd, $db, $port, $socket)))
+ printf("[028] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[029] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
+ if (NULL !== ($tmp = $link->connect($phost, $user, $passwd, $db, $port, $socket)))
+ printf("[030] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+ print "done!";
+?>
+--EXPECTF--
+array(1) {
+ [%u|b%"it_works"]=>
+ %unicode|string%(2) "ok"
+}
+array(1) {
+ [%u|b%"syntax"]=>
+ %unicode|string%(18) "works also with oo"
+}
+Flipping phost/host order
+array(1) {
+ [%u|b%"it_works"]=>
+ %unicode|string%(2) "ok"
+}
+array(1) {
+ [%u|b%"syntax"]=>
+ %unicode|string%(18) "works also with oo"
+}
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_pconn_disabled.phpt b/ext/mysqli/tests/mysqli_pconn_disabled.phpt
index ee0efc4e5..1fe6271c7 100644
--- a/ext/mysqli/tests/mysqli_pconn_disabled.phpt
+++ b/ext/mysqli/tests/mysqli_pconn_disabled.phpt
@@ -17,7 +17,7 @@ mysqli.max_persistent=2
mysqli.max_links=2
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$host = 'p:' . $host;
if (!$link1 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
diff --git a/ext/mysqli/tests/mysqli_pconn_max_links.phpt b/ext/mysqli/tests/mysqli_pconn_max_links.phpt
index 3ccb76136..8e755393f 100644
--- a/ext/mysqli/tests/mysqli_pconn_max_links.phpt
+++ b/ext/mysqli/tests/mysqli_pconn_max_links.phpt
@@ -160,7 +160,7 @@ mysqli.max_persistent=2
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_pconn_reuse.phpt b/ext/mysqli/tests/mysqli_pconn_reuse.phpt
index 8a43e7c30..b42800a77 100644
--- a/ext/mysqli/tests/mysqli_pconn_reuse.phpt
+++ b/ext/mysqli/tests/mysqli_pconn_reuse.phpt
@@ -17,7 +17,7 @@ mysqli.max_persistent=2
mysqli.max_links=2
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$host = 'p:' . $host;
if (!$link1 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
diff --git a/ext/mysqli/tests/mysqli_pconn_twice.phpt b/ext/mysqli/tests/mysqli_pconn_twice.phpt
new file mode 100644
index 000000000..12800c2ce
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_pconn_twice.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Calling connect() on an open persistent connection to create a new persistent connection
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+if (!$IS_MYSQLND)
+ die("skip mysqlnd test only");
+
+?>
+--INI--
+mysqli.allow_persistent=1
+mysqli.max_persistent=-1
+mysqli.max_links=-1
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ $host = 'p:' . $host;
+ 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);
+
+ if (true !== ($tmp = my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
+ printf("[003] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
+
+ /* it is undefined which pooled connection we get - thread ids may differ */
+
+ if (!($res = mysqli_query($link, "SELECT 'ok' AS it_works")) ||
+ !($row = mysqli_fetch_assoc($res)))
+ printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ var_dump($row);
+ mysqli_free_result($res);
+
+ mysqli_close($link);
+
+ if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
+ printf("[007] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
+
+ if (true !== ($tmp = $link->real_connect($host, $user, $passwd, $db, $port, $socket)))
+ printf("[009] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
+
+ /* it is undefined which pooled connection we get - thread ids may differ */
+
+ if (!($res = $link->query("SELECT 'works also with oo' AS syntax")) ||
+ !($row = $res->fetch_assoc()))
+ printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ var_dump($row);
+ mysqli_free_result($res);
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = $link->connect($host, $user, $passwd, $db, $port, $socket)))
+ printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[014] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
+ if (NULL !== ($tmp = $link->connect($host, $user, $passwd, $db, $port, $socket)))
+ printf("[015] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+ print "done!";
+?>
+--EXPECTF--
+array(1) {
+ [%u|b%"it_works"]=>
+ %unicode|string%(2) "ok"
+}
+array(1) {
+ [%u|b%"syntax"]=>
+ %unicode|string%(18) "works also with oo"
+}
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_pconnect.phpt b/ext/mysqli/tests/mysqli_pconnect.phpt
index 57b44ebaf..fbb1092e6 100644
--- a/ext/mysqli/tests/mysqli_pconnect.phpt
+++ b/ext/mysqli/tests/mysqli_pconnect.phpt
@@ -11,7 +11,7 @@ if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$host = 'p:' . $host;
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
diff --git a/ext/mysqli/tests/mysqli_phpinfo.phpt b/ext/mysqli/tests/mysqli_phpinfo.phpt
index 14fdfcd65..d60636ae4 100644
--- a/ext/mysqli/tests/mysqli_phpinfo.phpt
+++ b/ext/mysqli/tests/mysqli_phpinfo.phpt
@@ -57,8 +57,7 @@ require_once('skipifconnectfailure.inc');
'connect_failure', 'connection_reused', 'explicit_close', 'implicit_close',
'disconnect_close', 'in_middle_of_command_close', 'explicit_free_result',
'implicit_free_result', 'explicit_stmt_close', 'implicit_stmt_close',
- 'put_hits', 'put_misses', 'get_hits', 'get_misses',
- 'size', 'free_items', 'references', 'mysqli.cache_size',
+ 'size',
'mysqli.allow_local_infile',
'mysqli.allow_persistent', 'mysqli.max_persistent'
);
diff --git a/ext/mysqli/tests/mysqli_ping.phpt b/ext/mysqli/tests/mysqli_ping.phpt
index 80a2a20a2..d9a134c0e 100644
--- a/ext/mysqli/tests/mysqli_ping.phpt
+++ b/ext/mysqli/tests/mysqli_ping.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt b/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt
index 56f9182f4..9c02cf976 100644
--- a/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt
+++ b/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt
@@ -155,7 +155,7 @@ if (!$IS_MYSQLND)
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_prepare.phpt b/ext/mysqli/tests/mysqli_prepare.phpt
index 0737aba83..bba82745e 100644
--- a/ext/mysqli/tests/mysqli_prepare.phpt
+++ b/ext/mysqli/tests/mysqli_prepare.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -118,7 +118,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_prepare_no_object.phpt b/ext/mysqli/tests/mysqli_prepare_no_object.phpt
index 3d022f440..e45de69ed 100644
--- a/ext/mysqli/tests/mysqli_prepare_no_object.phpt
+++ b/ext/mysqli/tests/mysqli_prepare_no_object.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (false !== ($tmp = mysqli_prepare($link, false)))
diff --git a/ext/mysqli/tests/mysqli_query.phpt b/ext/mysqli/tests/mysqli_query.phpt
index 0e45f0388..73bebe107 100644
--- a/ext/mysqli/tests/mysqli_query.phpt
+++ b/ext/mysqli/tests/mysqli_query.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -114,7 +114,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_query_local_infile_large.phpt b/ext/mysqli/tests/mysqli_query_local_infile_large.phpt
index 306dfceab..8b115a507 100644
--- a/ext/mysqli/tests/mysqli_query_local_infile_large.phpt
+++ b/ext/mysqli/tests/mysqli_query_local_infile_large.phpt
@@ -31,7 +31,7 @@ mysqli.allow_local_infile=1
fclose($fp);
printf("Filesize in bytes: %d\nRows: %d\n", $bytes, $rowno);
- include "connect.inc";
+ require_once("connect.inc");
if (!($link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
printf("[002] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
@@ -72,7 +72,7 @@ $file = tempnam(sys_get_temp_dir(), 'mysqli_test.cvs');
if (file_exists($file))
unlink($file);
-include "connect.inc";
+require_once("connect.inc");
if (!($link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_query_stored_proc.phpt b/ext/mysqli/tests/mysqli_query_stored_proc.phpt
index 0ca71a40b..10bf86bf4 100644
--- a/ext/mysqli/tests/mysqli_query_stored_proc.phpt
+++ b/ext/mysqli/tests/mysqli_query_stored_proc.phpt
@@ -152,7 +152,7 @@ END;')) {
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_real_escape_string.phpt b/ext/mysqli/tests/mysqli_real_escape_string.phpt
index b25c72acd..6c372581e 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_real_escape_string()
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
-require_once('skipifemb.inc');
+require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
index 038cca940..79309923c 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_real_escape_string()
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
-require_once('skipifemb.inc');
+require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt
index 8e3034415..866ad6a9d 100644
--- a/ext/mysqli/tests/mysqli_real_query.phpt
+++ b/ext/mysqli/tests/mysqli_real_query.phpt
@@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -91,7 +91,7 @@ ver_param;')) {
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt
index dc927997f..11ddef88b 100644
--- a/ext/mysqli/tests/mysqli_report.phpt
+++ b/ext/mysqli/tests/mysqli_report.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_report_wo_ps.phpt b/ext/mysqli/tests/mysqli_report_wo_ps.phpt
index 08909264a..e7ba6bb7e 100644
--- a/ext/mysqli/tests/mysqli_report_wo_ps.phpt
+++ b/ext/mysqli/tests/mysqli_report_wo_ps.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt
index dfde9a78c..0ecc30b62 100644
--- a/ext/mysqli/tests/mysqli_result_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/mysqli_rollback.phpt b/ext/mysqli/tests/mysqli_rollback.phpt
index 616f50da8..1b1fe8b35 100644
--- a/ext/mysqli/tests/mysqli_rollback.phpt
+++ b/ext/mysqli/tests/mysqli_rollback.phpt
@@ -29,7 +29,7 @@ mysqli_rollback()
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt
index bc774cfec..d700a2b55 100644
--- a/ext/mysqli/tests/mysqli_select_db.phpt
+++ b/ext/mysqli/tests/mysqli_select_db.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_send_query.phpt b/ext/mysqli/tests/mysqli_send_query.phpt
index 53cf25093..7de2bfc21 100755
--- a/ext/mysqli/tests/mysqli_send_query.phpt
+++ b/ext/mysqli/tests/mysqli_send_query.phpt
@@ -15,7 +15,7 @@ if (!$TEST_EXPERIMENTAL)
--FILE--
<?php
/* NOTE: tests is a stub, but function is deprecated, as long as it does not crash when invoking it... */
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt
index baf97bd3d..4f4aaa52a 100644
--- a/ext/mysqli/tests/mysqli_set_charset.phpt
+++ b/ext/mysqli/tests/mysqli_set_charset.phpt
@@ -50,7 +50,7 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt
index 5cb1459d8..c8da0183b 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 ec097fe2b..ad0a3532f 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 03f428882..e7df96e5a 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 cb8162db7..c2ee87b34 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
die("skip Cannot connect to MySQL");
if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) {
@@ -33,8 +33,7 @@ if ('ON' != $row['Value'])
mysqli.allow_local_infile=1
--FILE--
<?php
- include "connect.inc";
- include("table.inc");
+ require("table.inc");
require_once('local_infile_tools.inc');
function callback_close_link($fp, &$buffer, $buflen, &$error) {
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 7498e64f4..4ebf8ded2 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
die("skip Cannot connect to MySQL");
if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) {
@@ -33,8 +33,7 @@ if ('ON' != $row['Value'])
mysqli.allow_local_infile=1
--FILE--
<?php
- include "connect.inc";
- include("table.inc");
+ require_once("table.inc");
require_once('local_infile_tools.inc');
function callback_closefile($fp, &$buffer, $buflen, &$error) {
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 7e2445889..3d94a545d 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 3757b61d9..09b4f90f6 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
die("skip Cannot connect to MySQL");
if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) {
@@ -30,8 +30,7 @@ if ('ON' != $row['Value'])
mysqli.allow_local_infile=1
--FILE--
<?php
- include "connect.inc";
- include("table.inc");
+ require("table.inc");
require_once('local_infile_tools.inc');
function callback_kill_link($fp, &$buffer, $buflen, &$error) {
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 30a3bcc03..ca4270549 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 465dcdb9d..8b56deafa 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 5ea82e93f..1c47292e3 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 6354630c0..6113abae6 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 c30f6ea91..423ad834e 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 cde8f4b12..33dd5164e 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 a793ac662..9af9974e7 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 c89fc2152..e6dfecb7e 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 = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket))
+if (!$link = my_mysqli_connect($host, $user, $passwd, $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 21aacd25f..7c96d5980 100644
--- a/ext/mysqli/tests/mysqli_set_opt.phpt
+++ b/ext/mysqli/tests/mysqli_set_opt.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt b/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt
index 77047a19c..7e0593cb5 100644
--- a/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt
@@ -14,8 +14,7 @@ if (!stristr(mysqli_get_client_info(), "mysqlnd"))
?>
--FILE--
<?php
- include "connect.inc";
- include "table.inc";
+ require_once("table.inc");
if (true !== ($tmp = mysqli_set_opt($link, MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, 1)))
printf("[001] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_sqlstate.phpt b/ext/mysqli/tests/mysqli_sqlstate.phpt
index 0ed39f4ee..56580cda4 100644
--- a/ext/mysqli/tests/mysqli_sqlstate.phpt
+++ b/ext/mysqli/tests/mysqli_sqlstate.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt
index e868f34f1..2abae55c1 100644
--- a/ext/mysqli/tests/mysqli_ssl_set.phpt
+++ b/ext/mysqli/tests/mysqli_ssl_set.phpt
@@ -10,7 +10,7 @@ if (!function_exists('mysqli_ssl_set'))
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stat.phpt b/ext/mysqli/tests/mysqli_stat.phpt
index 7d7d4e70c..f1cd56ccd 100644
--- a/ext/mysqli/tests/mysqli_stat.phpt
+++ b/ext/mysqli/tests/mysqli_stat.phpt
@@ -1,14 +1,14 @@
--TEST--
mysqli_stat()
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
-require_once('skipifemb.inc');
+require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
index d4761dd6b..4765d6487 100644
--- a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
index abedf56b2..a4eb4d0f3 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt
index 26bbf9649..0d5e8f9be 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt
@@ -9,7 +9,6 @@ die("SKIP: prefetch isn't supported at the moment");
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
$stmt = mysqli_stmt_init($link);
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
index 7bc9882f8..5ff6e5e45 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
@@ -45,23 +45,27 @@ require_once('skipifconnectfailure.inc');
printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
$stmt->prepare("SELECT * FROM test");
+
mt_srand(microtime(true));
+
+ /* mysqlnd detects invalid attributes, libmysql does not AFAIK */
+ $invalid_ret = ($IS_MYSQLND) ? false : true;
+
for ($i = -100; $i < 1000; $i++) {
if (in_array($i, $valid_attr))
continue;
$invalid_attr = $i;
- if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) {
- printf("[006a] Expecting boolean/false for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+ if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) {
+ printf("[006a] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp);
}
}
- for ($i = 0; $i < 10; $i++) {
+ for ($i = 0; $i < 2; $i++) {
do {
$invalid_attr = mt_rand(-1 * (min(4294967296, PHP_INT_MAX) + 1), min(4294967296, PHP_INT_MAX));
} while (in_array($invalid_attr, $valid_attr));
- if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) {
- /* Although it may be desired to get false neither the MySQL Client Library nor mysqlnd are supposed to detect invalid codes */
- printf("[006b] Expecting boolean/true for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+ if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) {
+ printf("[006b] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp);
}
}
$stmt->close();
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
index 9aaac9804..33ef3175a 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
@@ -17,7 +17,7 @@ require_once('skipifconnectfailure.inc');
in this file and we test mysqli_stmt_bind_result() in the other
test -- therefore the "duplicate" makes some sense to me.
*/
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
index a7d36743c..e1e3a92e5 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
class foo {
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt
index 24d4314f1..91cb9d022 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
function findRow($offset, $link, $id, $label) {
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt
index ab871ce95..daab40c50 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
function bind_twice($link, $engine, $sql_type1, $sql_type2, $bind_type1, $bind_type2, $bind_value1, $bind_value2, $offset) {
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
index f5756740e..5b7da34d8 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$hint_str_or_unicode = (version_compare(PHP_VERSION, '5.9.9', '>') == 1) ? "unicode":"string";
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt
index 1eef76747..acf0d0be2 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
function dec32bin($dec, $bits) {
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt
index 511f7e3e1..ee659d4b4 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt
@@ -8,7 +8,6 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
$stmt = mysqli_stmt_init($link);
diff --git a/ext/mysqli/tests/mysqli_stmt_close.phpt b/ext/mysqli/tests/mysqli_stmt_close.phpt
index b38f0cd68..64e76e54c 100644
--- a/ext/mysqli/tests/mysqli_stmt_close.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_close.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
index 246158e4c..a1cebeae8 100644
--- a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt
index 25c183a2a..b23f94d81 100644
--- a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
if (!$c1 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
@@ -56,7 +56,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_stmt_errno.phpt b/ext/mysqli/tests/mysqli_stmt_errno.phpt
index 59fde718d..070f2514a 100644
--- a/ext/mysqli/tests/mysqli_stmt_errno.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_errno.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_error.phpt b/ext/mysqli/tests/mysqli_stmt_error.phpt
index ffb77fe0a..e18aa07f3 100644
--- a/ext/mysqli/tests/mysqli_stmt_error.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_error.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt
index d1d62c206..61763864e 100644
--- a/ext/mysqli/tests/mysqli_stmt_execute.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt
index afedea42d..29e3947a7 100644
--- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt
@@ -183,7 +183,7 @@ if (mysqli_get_server_version($link) <= 50000) {
?>
--CLEAN--
<?php
-include "connect.inc";
+require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
diff --git a/ext/mysqli/tests/mysqli_stmt_fetch.phpt b/ext/mysqli/tests/mysqli_stmt_fetch.phpt
index 6f7014831..fca510003 100644
--- a/ext/mysqli/tests/mysqli_stmt_fetch.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_fetch.phpt
@@ -13,7 +13,7 @@ require_once('skipifconnectfailure.inc');
mysqli_stmt_bind_result.phpt already. Restrict
this test case to the basics.
*/
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt
index e63591a10..0cbc05f6c 100644
--- a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt
@@ -8,8 +8,8 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
- require('table.inc');
+ require_once("connect.inc");
+ require_once('table.inc');
$bind_res = $id = null;
if (!($stmt = mysqli_stmt_init($link)) ||
diff --git a/ext/mysqli/tests/mysqli_stmt_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_field_count.phpt
index 2dbf487ac..7dfd3a400 100644
--- a/ext/mysqli/tests/mysqli_stmt_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_field_count.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_free_result.phpt b/ext/mysqli/tests/mysqli_stmt_free_result.phpt
index 12c1a34bc..08b33b795 100644
--- a/ext/mysqli/tests/mysqli_stmt_free_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_free_result.phpt
@@ -13,7 +13,7 @@ require_once('skipifconnectfailure.inc');
mysqli_stmt_bind_result.phpt already. Restrict
this test case to the basics.
*/
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result.phpt b/ext/mysqli/tests/mysqli_stmt_get_result.phpt
index 58a7f0cde..fe18be40c 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result.phpt
@@ -16,7 +16,7 @@ if (!function_exists('mysqli_stmt_get_result'))
mysqli_stmt_bind_result.phpt already. Restrict
this test case to the basics.
*/
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
index 1f493d2f1..8c2aad1f1 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
@@ -15,7 +15,7 @@ if (!function_exists('mysqli_stmt_get_result'))
mysqli_stmt_bind_result.phpt already. Restrict
this test case to the basics.
*/
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt
index dab805c1b..046f90438 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt
@@ -11,7 +11,6 @@ mysqli_stmt_get_result() - meta data, field_count()
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt
index 7fdabc001..86898807a 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt
@@ -11,7 +11,6 @@ if (!function_exists('mysqli_stmt_get_result'))
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
index 43ec10c4f..1a2dba413 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
@@ -11,7 +11,6 @@ if (!function_exists('mysqli_stmt_get_result'))
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!($stmt = mysqli_stmt_init($link)) ||
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt
index 717b39bd5..c057f7d9f 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt
@@ -16,7 +16,6 @@ if (!function_exists('mysqli_stmt_get_result'))
mysqli_stmt_bind_result.phpt already. Restrict
this test case to the basics.
*/
- include "connect.inc";
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
index c4312c603..ffb655d5f 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
@@ -11,7 +11,6 @@ if (!function_exists('mysqli_stmt_get_result'))
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_init.phpt b/ext/mysqli/tests/mysqli_stmt_init.phpt
index 7d0154d24..4f09719c8 100644
--- a/ext/mysqli/tests/mysqli_stmt_init.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_init.phpt
@@ -13,7 +13,7 @@ require_once('skipifconnectfailure.inc');
mysqli_stmt_bind_result.phpt already. Restrict
this test case to the basics.
*/
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
index 0347e66bd..c7a5affd9 100644
--- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
index 4f3bc6142..28ee64fd5 100644
--- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_param_count.phpt b/ext/mysqli/tests/mysqli_stmt_param_count.phpt
index f55acfbbd..84bcfd9e8 100644
--- a/ext/mysqli/tests/mysqli_stmt_param_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_param_count.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_prepare.phpt
index 115e1a52e..3eb576aec 100644
--- a/ext/mysqli/tests/mysqli_stmt_prepare.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_prepare.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
// Note: No SQL tests here! We can expand one of the *fetch()
// tests to a generic SQL test, if we ever need that.
diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt
index 9f8864d28..d731da2f5 100644
--- a/ext/mysqli/tests/mysqli_stmt_reset.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
// Note: No SQL tests here! We can expand one of the *fetch()
// tests to a generic SQL test, if we ever need that.
diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
index 34d3bb201..faccdf9e8 100644
--- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt
index f0b775764..a7dad1b47 100644
--- a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt
@@ -10,7 +10,6 @@ die("skip Check again when the Klingons visit earth - http://bugs.mysql.com/bug.
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
function testStatement($offset, $link, $sql, $expected_lib, $expected_mysqlnd, $check_mysqlnd, $compare) {
diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
index 4f173eff6..1a6a3d7db 100644
--- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt
index 5bd40d84f..a1fc2007f 100644
--- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt
@@ -11,7 +11,6 @@ if (stristr(mysqli_get_client_info(), 'mysqlnd'))
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt
index be8e59544..95d2302f4 100644
--- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt
@@ -11,7 +11,6 @@ if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
?>
--FILE--
<?php
- include "connect.inc";
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
index b8a97cdef..5ea35df24 100644
--- a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt
index ee0bf83a8..a6411ca93 100644
--- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt
index edddbea94..57d8d6d6a 100644
--- a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/mysqli_store_result.phpt b/ext/mysqli/tests/mysqli_store_result.phpt
index 206cae309..c61c124da 100644
--- a/ext/mysqli/tests/mysqli_store_result.phpt
+++ b/ext/mysqli/tests/mysqli_store_result.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_thread_id.phpt b/ext/mysqli/tests/mysqli_thread_id.phpt
index a67060a1c..3a7e1ae5d 100644
--- a/ext/mysqli/tests/mysqli_thread_id.phpt
+++ b/ext/mysqli/tests/mysqli_thread_id.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_unclonable.phpt b/ext/mysqli/tests/mysqli_unclonable.phpt
index d21eafa79..e332b9f24 100644
--- a/ext/mysqli/tests/mysqli_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_unclonable.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",
diff --git a/ext/mysqli/tests/mysqli_use_result.phpt b/ext/mysqli/tests/mysqli_use_result.phpt
index d1b09f104..25d16926a 100644
--- a/ext/mysqli/tests/mysqli_use_result.phpt
+++ b/ext/mysqli/tests/mysqli_use_result.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_warning_count.phpt b/ext/mysqli/tests/mysqli_warning_count.phpt
index 0293fe869..cff9c02b1 100644
--- a/ext/mysqli/tests/mysqli_warning_count.phpt
+++ b/ext/mysqli/tests/mysqli_warning_count.phpt
@@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
$tmp = NULL;
$link = NULL;
diff --git a/ext/mysqli/tests/mysqli_warning_unclonable.phpt b/ext/mysqli/tests/mysqli_warning_unclonable.phpt
index 57d5de764..d3ae47d0b 100644
--- a/ext/mysqli/tests/mysqli_warning_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_warning_unclonable.phpt
@@ -11,7 +11,7 @@ if (!$TEST_EXPERIMENTAL)
?>
--FILE--
<?php
- include "connect.inc";
+ require_once("connect.inc");
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",