From 8c828967ee981c6eeb5c7fb32c616997f46f1a32 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Thu, 16 Feb 2006 12:02:38 +0100 Subject: Bug#2845 client fails to reconnect if using TCP/IP - Detect that connection to server has been broken in "net_clear". Since net_clear is always called before we send command to server, we can be sure that server has not received the command. --- mysql-test/t/wait_timeout.test | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/wait_timeout.test') diff --git a/mysql-test/t/wait_timeout.test b/mysql-test/t/wait_timeout.test index 26f91569868..1c9efa7c07d 100644 --- a/mysql-test/t/wait_timeout.test +++ b/mysql-test/t/wait_timeout.test @@ -3,9 +3,25 @@ # --disable_reconnect select 1; -# wait_timeout is 2, so we should get disconnected now ---sleep 5 +# wait_timeout is 1, so we should get disconnected now +--sleep 2 +# When the connection is closed in this way, the error code should +# be consistent see bug#2845 for an explanation --error 2006 select 2; --enable_reconnect select 3; + +# Do the same test as above on a TCP connection +connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); +--disable_reconnect +select 1; +# wait_timeout is 1, so we should get disconnected now +--sleep 2 +# When the connection is closed in this way, the error code should +# be consistent see bug#2845 for an explanation +--error 2006 +select 2; +--enable_reconnect +select 3; +disconnect con1; -- cgit v1.2.1