Commit d231dc8f authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix (hopefully) a race condition in a test. Wait until killed connection

is gone.
parent d5558780
...@@ -3,24 +3,26 @@ ...@@ -3,24 +3,26 @@
# status variable, but KILL connection does # status variable, but KILL connection does
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/count_sessions.inc
FLUSH STATUS; FLUSH STATUS;
# Connect/Disconnect look that aborted_clients stays 0 # Connect/Disconnect look that aborted_clients stays 0
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
disconnect con1; disconnect con1;
connection default; connection default;
-- source include/wait_until_count_sessions.inc
# Check that there is 0 aborted clients so far # Check that there is 0 aborted clients so far
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients'; SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
# Kill a connection, check that aborted_clients is incremented # Kill a connection, check that aborted_clients is incremented
connect(con2,localhost,root,,); connect(con2,localhost,root,,);
--disable_reconnect --disable_reconnect
--error ER_CONNECTION_KILLED --error ER_CONNECTION_KILLED
KILL CONNECTION_ID(); KILL CONNECTION_ID();
disconnect con2; disconnect con2;
connection default; connection default;
-- source include/wait_until_count_sessions.inc
# aborted clients must be 1 now # aborted clients must be 1 now
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients'; SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
FLUSH STATUS; FLUSH STATUS;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment