Description:
When using Federated engine, if connection is closed on source server because wait_time is exceeded, client gets "Got packets out of order" error.
This happens on 8.0.24 and later, and not earlier. Possibly this is related to the more informative error message when connection is closed because of wait_timeout? Using "kill <id>;" on connections opened by Federated do not show this issue.
"Client" side of Federated shows no error in log, the server holding the table shows "The client was disconnected by the server because of inactivity".
How to repeat:
Set up two servers:
dbdeployer deploy multiple --nodes 2 8.0.25 --my-cnf-options federated --my-cnf-options log_error_verbosity=3
n2 -e "set global wait_timeout=5"
n2 -e "create table test.f (id int primary key); insert into test.f values(1)"
n1 -e "create server test foreign data wrapper test1 options (user 'msandbox', password 'msandbox', host '127.0.0.1', port 26729, database 'test');"
n1 -e "create table test.f (id int primary key) engine=federated connection='test';"
n1 -e "select * from test.f; select sleep(10); select * from test.f;"
+----+
| id |
+----+
| 1 |
+----+
+-----------+
| sleep(10) |
+-----------+
| 0 |
+-----------+
ERROR 1156 (08S01) at line 1: Got packets out of order