From c13f68fa14a5a594775d9179aebc563a3a8b9983 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 13 Oct 2009 15:47:17 +0300 Subject: [PATCH] Force restart before maria_showlog_error to get rid of status from previous connections This fixes a race condition in the test system mysql-test/include/maria_empty_logs.inc: Added comment mysql-test/include/wait_for_status_var.inc: Fixed type in variable name. Add ' around variables for better error message mysql-test/mysql-test-run.pl: Remove -skip-falcon (not to be used), add skip-pbxt to bootstrap mysql-test/suite/maria/t/maria_showlog_error-master.opt: Force restart before maria_showlog_error to get rid of status from previous connection --- mysql-test/include/maria_empty_logs.inc | 6 +++++- mysql-test/include/wait_for_status_var.inc | 3 ++- mysql-test/mysql-test-run.pl | 2 +- mysql-test/suite/maria/t/maria_showlog_error-master.opt | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 mysql-test/suite/maria/t/maria_showlog_error-master.opt diff --git a/mysql-test/include/maria_empty_logs.inc b/mysql-test/include/maria_empty_logs.inc index 00f92010bd0..bbe6673f10d 100644 --- a/mysql-test/include/maria_empty_logs.inc +++ b/mysql-test/include/maria_empty_logs.inc @@ -1,6 +1,10 @@ # Maria help script. # Cleans up all logs to give recovery a fresh start. - +# +# Note that this script relies on the number of threads connect at start of +# this script, so one should run this script with a freshly started server +# for it to work. +# # API: set mel_keep_control_file=1 if want to keep control file; # uses vardir, port and socket. diff --git a/mysql-test/include/wait_for_status_var.inc b/mysql-test/include/wait_for_status_var.inc index 4c168da7f1a..6ba632ce46b 100644 --- a/mysql-test/include/wait_for_status_var.inc +++ b/mysql-test/include/wait_for_status_var.inc @@ -51,11 +51,12 @@ if (`SELECT '$_status_var_comparsion' = ''`) } let $_show_status_value= query_get_value("SHOW $status_type STATUS LIKE '$status_var'", Value, 1); + while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value')`) { if (!$_status_timeout_counter) { - --echo **** ERROR: failed while waiting for $status_type $status_var $_status_var_comparison $status_var_value **** + --echo **** ERROR: failed while waiting for '$status_type' '$status_var' $_status_var_comparsion '$status_var_value' **** --echo Note: the following output may have changed since the failure was detected --echo **** Showing STATUS, PROCESSLIST **** eval SHOW $status_type STATUS LIKE '$status_var'; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index d8274192419..ebc21b70075 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2826,7 +2826,7 @@ sub mysql_install_db { mtr_add_arg($args, "--basedir=%s", $install_basedir); mtr_add_arg($args, "--datadir=%s", $install_datadir); mtr_add_arg($args, "--loose-skip-innodb"); - mtr_add_arg($args, "--loose-skip-falcon"); + mtr_add_arg($args, "--loose-skip-pbxt"); mtr_add_arg($args, "--loose-skip-ndbcluster"); mtr_add_arg($args, "--loose-skip-maria"); mtr_add_arg($args, "--disable-sync-frm"); diff --git a/mysql-test/suite/maria/t/maria_showlog_error-master.opt b/mysql-test/suite/maria/t/maria_showlog_error-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/maria/t/maria_showlog_error-master.opt @@ -0,0 +1 @@ +--force-restart