summaryrefslogtreecommitdiff
path: root/mysql-test/t/wait_timeout.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/wait_timeout.test')
-rw-r--r--mysql-test/t/wait_timeout.test13
1 files changed, 11 insertions, 2 deletions
diff --git a/mysql-test/t/wait_timeout.test b/mysql-test/t/wait_timeout.test
index 63809252a01..6947e346675 100644
--- a/mysql-test/t/wait_timeout.test
+++ b/mysql-test/t/wait_timeout.test
@@ -10,8 +10,11 @@
-- source include/not_embedded.inc
-- source include/one_thread_per_connection.inc
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
#
-# Bug#8731: wait_timeout does not work on Mac OS X
+# Bug#8731 wait_timeout does not work on Mac OS X
#
let $start_value= `SELECT @@global.wait_timeout`;
@@ -113,6 +116,7 @@ while (!`select @aborted_clients`)
# the disconnect has reached client
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist;
--source include/wait_condition.inc
+disconnect wait_con;
--echo connection con1;
connection con1;
@@ -126,8 +130,13 @@ SELECT 2;
SELECT 3;
--replace_result $start_value <start_value>
eval SET @@global.wait_timeout= $start_value;
-# ML: The start value might be changed in future ...
--echo disconnection con1;
disconnect con1;
+# The last connect is to keep tools checking the current test happy.
+connect (default,localhost,root,,test,,);
+
+# Wait till all disconnects are completed
+--source include/wait_until_count_sessions.inc
+