diff options
author | msvensson@neptunus.(none) <> | 2006-02-16 12:02:38 +0100 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2006-02-16 12:02:38 +0100 |
commit | 8c828967ee981c6eeb5c7fb32c616997f46f1a32 (patch) | |
tree | 90ada62285927ff547b71f85b69ed2a228a4dfc1 /mysql-test | |
parent | 561d7a03aa4438b80aab5895abb4f8ffda41cc8d (diff) | |
download | mariadb-git-8c828967ee981c6eeb5c7fb32c616997f46f1a32.tar.gz |
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.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/wait_timeout.result | 8 | ||||
-rw-r--r-- | mysql-test/t/wait_timeout-master.opt | 2 | ||||
-rw-r--r-- | mysql-test/t/wait_timeout.test | 20 |
3 files changed, 27 insertions, 3 deletions
diff --git a/mysql-test/r/wait_timeout.result b/mysql-test/r/wait_timeout.result index 56232e481c0..683986abf5d 100644 --- a/mysql-test/r/wait_timeout.result +++ b/mysql-test/r/wait_timeout.result @@ -6,3 +6,11 @@ ERROR HY000: MySQL server has gone away select 3; 3 3 +select 1; +1 +1 +select 2; +ERROR HY000: MySQL server has gone away +select 3; +3 +3 diff --git a/mysql-test/t/wait_timeout-master.opt b/mysql-test/t/wait_timeout-master.opt index 0ad622e9677..9e5c2289eb2 100644 --- a/mysql-test/t/wait_timeout-master.opt +++ b/mysql-test/t/wait_timeout-master.opt @@ -1 +1 @@ ---wait-timeout=2 +--wait-timeout=1 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; |