1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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/r/wait_timeout.result:
  Update test result
mysql-test/t/wait_timeout-master.opt:
  Decrease wait_timeout value to avoid unneccessary sleeps
mysql-test/t/wait_timeout.test:
  Test that same error message is returned when disconnected regardless of connection is socket or TCP
  Decrease sleep times
sql/net_serv.cc:
  Make "net_clear" detect if connection with server has been broken by 
  performing a select. If the select returns that there are data to read but
  no data can be read, that means the connection is broken. Signal disconnected
  to "write" functions by setting error to 2.
This commit is contained in:
unknown
2006-02-16 12:02:38 +01:00
parent 3c9952a1ae
commit d430e2474f
4 changed files with 101 additions and 14 deletions

View File

@ -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