From 1d8cfe3c775d69b169750f13dc299763e4e346b2 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 30 Mar 2011 21:26:31 +0200 Subject: [PATCH] LP686006 : maria recovery tests fail. All failing cases were attempts to use connection after the server was brought down and restarted. Connections used client reconnect option. The reason for failures is the behavior of sockets on Windows: for a short period after crash (short enough to make the error not reproducible under debugger), write to socket on client side would succeed but subsequent read would fail. MYSQL_OPT_RECONNECT does not really help in this case , because in the case given here ,as mysql_real_query() (which can handle reconnect option) succeeds and mysql_read_results() (can't handle reconnect) fails. The fix is adding --include wait_until_connected_again.inc to appropriate places in test. This ensures that read errors are caught and connection is recreated. --- mysql-test/include/maria_make_snapshot_for_comparison.inc | 1 + mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql-test/include/maria_make_snapshot_for_comparison.inc b/mysql-test/include/maria_make_snapshot_for_comparison.inc index cb756f60527..0c71bd10408 100644 --- a/mysql-test/include/maria_make_snapshot_for_comparison.inc +++ b/mysql-test/include/maria_make_snapshot_for_comparison.inc @@ -8,6 +8,7 @@ # cover tables mysqltest.$mms_tname1,...$mms_tnameN connection admin; +--source include/wait_until_connected_again.inc let $mms_table_to_use=$mms_tables; let $mms_purpose=comparison; diff --git a/mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc b/mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc index dc706174b7c..fded4cb83b4 100644 --- a/mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc +++ b/mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc @@ -11,6 +11,7 @@ connection admin; +--source include/wait_until_connected_again.inc let $mms_table_to_use=$mms_tables; let $mms_purpose=feeding_recovery;