mariadb/storage
Arun Kuruvila a9b61b0029 Bug#17599258:- ERROR 1160 (08S01): GOT AN ERROR WRITING
COMMUNICATION PACKETS; FEDERATED TABLE

Description:- Execution of FLUSH TABLES on a federated
table which has been idle for wait_timeout (on the remote
server) + tcp_keepalive_time, fails with an error,
"ERROR 1160 (08S01): Got an error writing communication
packets."

Analysis:- During FLUSH TABLE execution the federated
table is closed which will inturn close the federated
connection. While closing the connection, federated server
tries to communincate with the remote server. Since the
connection was idle for wait_timeout(on the remote server)+
tcp_keepalive_time, the socket gets closed. So this
communication fails because of broken pipe and the error is
thrown. But federated connections are expected to reconnect
silently. And also it cannot reconnect because the 
"auto_reconnect" variable is set to 0 in "mysql_close()".

Fix:- Before closing the federated connection, in
"ha_federated_close()", a check is added which will verify
wheather the connection is alive or not. If the connection
is not alive, then "mysql->net.error" is set to 2 which
will indicate that the connetion is broken. Also the
setting of "auto_reconnect" variable to 0 is delayed and is
done after "COM_QUIT" command.
      
NOTE:- For reproducing this issue, "tcp_keepalive_time" has
to be set to a smaller value. This value is set in the
"/proc/sys/net/ipv4/tcp_keepalive_time" file in Unix
systems. So we need root permission for changing it, which
can't be done through mtr test. So submitting the patch
without mtr test.
2014-11-10 16:21:59 +05:30
..
archive Description: When we execute a correlated subquery on an 2014-04-10 11:10:31 +05:30
blackhole Merge 5.5.24 back into main 5.5. 2012-05-07 22:20:42 +02:00
csv Updated/added copyright headers 2012-02-16 10:48:16 +01:00
example Updated/added copyright headers 2014-01-06 10:52:35 +05:30
federated Bug#17599258:- ERROR 1160 (08S01): GOT AN ERROR WRITING 2014-11-10 16:21:59 +05:30
heap Bug#18463911 : SERVER CRASHES ON CREATING A TEMP TABLE WITH 2014-06-26 10:08:55 +05:30
innobase Bug #19815702 TIS620: CRASH WITH MULTI TABLE DELETE 2014-11-04 17:40:29 +05:30
myisam Changing the copyright headers a bit to be complaint with the standards 2014-08-27 16:06:50 +02:00
myisammrg Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
ndb Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
perfschema Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30