1
# This tests not performed with embedded server
2
-- source include/not_embedded.inc
3
-- source include/one_thread_per_connection.inc
6
# Bug #8731: wait_timeout does not work on Mac OS X
10
# Connect with another connection and reset counters
12
connect (wait_con,localhost,root,,test,,);
14
set session wait_timeout=100;
16
set @aborted_clients= 0;
19
# Disable reconnect and do the query
21
# If slow host (Valgrind...), we may have already timed out here.
22
# So force a reconnect if necessary, using a dummy query. And issue a
23
# 'flush status' to reset the 'aborted_clients' counter.
30
# Switch to wait_con and wait until server has aborted the connection
33
while (!`select @aborted_clients`)
36
let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
37
eval set @aborted_clients= SUBSTRING('$aborted_clients', 16)+0;
42
Failed to detect that client has been aborted;
46
# The server has disconnected, add small sleep to make sure
47
# the disconnect has reached client
51
# When the connection is closed in this way, the error code should
52
# be consistent see bug#2845 for an explanation
53
# depending on platform/client, either errno 2006 or 2013 can occur below
58
# Disconnect so that we will not be confused by a future abort from this
63
# Do the same test as above on a TCP connection
64
# (which we get by specifying a ip adress)
66
# Connect with another connection and reset counters
69
flush status; # Reset counters
71
set @aborted_clients= 0;
74
connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,);
78
# Switch to wait_con and wait until server has aborted the connection
81
while (!`select @aborted_clients`)
84
let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
85
eval set @aborted_clients= SUBSTRING('$aborted_clients', 16)+0;
90
Failed to detect that client has been aborted;
94
# The server has disconnected, add small sleep to make sure
95
# the disconnect has reached client
99
# When the connection is closed in this way, the error code should
100
# be consistent see bug#2845 for an explanation
101
# depending on platform/client, either errno 2006 or 2013 can occur below