[Test Issue] mysqli tests may fail due to not able to find table or table already exist #44

Closed
opened 2026-01-24 11:40:28 +01:00 by admin · 1 comment
Owner

Originally created by @hollyhuiLi on GitHub (Aug 27, 2019).

Most of them, it complains that table "test.test" doesn't exist, or table "test" already exit.

Test cases are below:
ext/mysqli/tests/bug48909.phpt
ext/mysqli/tests/bug49027.phpt
ext/mysqli/tests/mysqli_affected_rows_oo.phpt
ext/mysqli/tests/mysqli_autocommit.phpt
ext/mysqli/tests/mysqli_autocommit_oo.phpt
ext/mysqli/tests/mysqli_change_user_rollback.phpt
ext/mysqli/tests/mysqli_character_set.phpt
ext/mysqli/tests/mysqli_commit.phpt
ext/mysqli/tests/mysqli_explain_metadata.phpt
ext/mysqli/tests/mysqli_fetch_array_assoc.phpt
ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt
ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt
ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt
ext/mysqli/tests/mysqli_fetch_field_flags.phpt
ext/mysqli/tests/mysqli_fetch_field_types.phpt
ext/mysqli/tests/mysqli_get_host_info.phpt
ext/mysqli/tests/mysqli_get_proto_info.phpt
ext/mysqli/tests/mysqli_get_server_info.phpt
ext/mysqli/tests/mysqli_get_server_version.phpt
ext/mysqli/tests/mysqli_insert_id_variation.phpt
ext/mysqli/tests/mysqli_insert_packet_overflow.phpt
ext/mysqli/tests/mysqli_options_int_and_float_native.phpt
ext/mysqli/tests/mysqli_prepare.phpt
ext/mysqli/tests/mysqli_prepare_no_object.phpt
ext/mysqli/tests/mysqli_ps_select_union.phpt
ext/mysqli/tests/mysqli_query_stored_proc.phpt
ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt
ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt
ext/mysqli/tests/mysqli_stmt_attr_set.phpt
ext/mysqli/tests/mysqli_stmt_big_prepare.phpt
ext/mysqli/tests/mysqli_stmt_bind_limits.phpt
ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt
ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt
ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt
ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt
ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt
ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt
ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt
ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt
ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt
ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt
ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt
ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt
ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt
ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt
ext/mysqli/tests/mysqli_stmt_get_result_types.phpt
ext/mysqli/tests/mysqli_stmt_multires.phpt
ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt
ext/mysqli/tests/mysqli_stmt_store_result.phpt
ext/mysqli/tests/mysqli_store_result_buffered_c.phpt

Originally created by @hollyhuiLi on GitHub (Aug 27, 2019). Most of them, it complains that table "test.test" doesn't exist, or table "test" already exit. Test cases are below: ext/mysqli/tests/bug48909.phpt ext/mysqli/tests/bug49027.phpt ext/mysqli/tests/mysqli_affected_rows_oo.phpt ext/mysqli/tests/mysqli_autocommit.phpt ext/mysqli/tests/mysqli_autocommit_oo.phpt ext/mysqli/tests/mysqli_change_user_rollback.phpt ext/mysqli/tests/mysqli_character_set.phpt ext/mysqli/tests/mysqli_commit.phpt ext/mysqli/tests/mysqli_explain_metadata.phpt ext/mysqli/tests/mysqli_fetch_array_assoc.phpt ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt ext/mysqli/tests/mysqli_fetch_field_flags.phpt ext/mysqli/tests/mysqli_fetch_field_types.phpt ext/mysqli/tests/mysqli_get_host_info.phpt ext/mysqli/tests/mysqli_get_proto_info.phpt ext/mysqli/tests/mysqli_get_server_info.phpt ext/mysqli/tests/mysqli_get_server_version.phpt ext/mysqli/tests/mysqli_insert_id_variation.phpt ext/mysqli/tests/mysqli_insert_packet_overflow.phpt ext/mysqli/tests/mysqli_options_int_and_float_native.phpt ext/mysqli/tests/mysqli_prepare.phpt ext/mysqli/tests/mysqli_prepare_no_object.phpt ext/mysqli/tests/mysqli_ps_select_union.phpt ext/mysqli/tests/mysqli_query_stored_proc.phpt ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt ext/mysqli/tests/mysqli_stmt_attr_set.phpt ext/mysqli/tests/mysqli_stmt_big_prepare.phpt ext/mysqli/tests/mysqli_stmt_bind_limits.phpt ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt ext/mysqli/tests/mysqli_stmt_get_result_types.phpt ext/mysqli/tests/mysqli_stmt_multires.phpt ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt ext/mysqli/tests/mysqli_stmt_store_result.phpt ext/mysqli/tests/mysqli_store_result_buffered_c.phpt
admin closed this issue 2026-01-24 11:40:28 +01:00
Author
Owner

@cmb69 commented on GitHub (Aug 27, 2019):

This is likely caused by running these tests in parallel. You can verify this by constraining the threads to at most one here:
e4aaefd28d/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java (L59)

The proper fix would be to mark all mysqli tests as not thread-safe, i.e.:

 src/com/mostc/pftt/model/core/PhptTestCase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/com/mostc/pftt/model/core/PhptTestCase.java b/src/com/mostc/pftt/model/core/PhptTestCase.java
index 16d2bd9c36..3401be5a21 100644
--- a/src/com/mostc/pftt/model/core/PhptTestCase.java
+++ b/src/com/mostc/pftt/model/core/PhptTestCase.java
@@ -89,7 +89,7 @@ public class PhptTestCase extends TestCase {
 			new String[]{"ext/standard/tests/streams/stream_set_"},
 			new String[]{"ext/standard/tests/streams/"},
 			new String[]{"ext/standard/tests/sockets/", "ext/sockets/"},
-			new String[]{"ext/mysqli/tests/0", "ext/mysqli/tests/bug"},
+			new String[]{"ext/mysqli/tests/"},
 			new String[]{"ext/mbstring/tests/mb_output_"},
 			new String[]{"ext/pgsql/"},
 			new String[]{"ext/pdo_pgsql/"},

For PHP 7.4+, there are conflicts sections/files which should be used instead of this hard-coded list.

@cmb69 commented on GitHub (Aug 27, 2019): This is likely caused by running these tests in parallel. You can verify this by constraining the threads to at most one here: https://github.com/php/pftt2/blob/e4aaefd28d0e5a51645657593995768964d59f33/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java#L59 The proper fix would be to mark all mysqli tests as not thread-safe, i.e.: ````diff src/com/mostc/pftt/model/core/PhptTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/mostc/pftt/model/core/PhptTestCase.java b/src/com/mostc/pftt/model/core/PhptTestCase.java index 16d2bd9c36..3401be5a21 100644 --- a/src/com/mostc/pftt/model/core/PhptTestCase.java +++ b/src/com/mostc/pftt/model/core/PhptTestCase.java @@ -89,7 +89,7 @@ public class PhptTestCase extends TestCase { new String[]{"ext/standard/tests/streams/stream_set_"}, new String[]{"ext/standard/tests/streams/"}, new String[]{"ext/standard/tests/sockets/", "ext/sockets/"}, - new String[]{"ext/mysqli/tests/0", "ext/mysqli/tests/bug"}, + new String[]{"ext/mysqli/tests/"}, new String[]{"ext/mbstring/tests/mb_output_"}, new String[]{"ext/pgsql/"}, new String[]{"ext/pdo_pgsql/"}, ```` For PHP 7.4+, there are [conflicts sections/files](http://qa.php.net/phpt_details.php#conflicts_section) which should be used instead of this hard-coded list.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: php/pftt2#44