MDEV-16308 : protocol messed up sporadically

Context involves semicolon batching, and the error starts 10.2
No reproducible examples were made yet, but TCP trace suggests
multiple packets that are "squeezed" together (e.g overlong OK packet
that has a trailer which is belongs to another packet)

Remove thd->get_stmt_da()->set_skip_flush() when processing a batch.
skip_flush stems from the COM_MULTI code, which was checked in during
10.2 (and is never used)

The fix is confirmed to work, when evaluated by bug reporter (one of them)

We never reproduced it locally, with multiple tries
thus the root cause analysis is still missing.
This commit is contained in:
Vladislav Vaintroub 2020-01-30 21:11:24 +01:00
parent 6fc72ce169
commit b08579aa28

View file

@ -1833,7 +1833,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
! thd->is_error())
{
thd->get_stmt_da()->set_skip_flush();
/*
Multiple queries exist, execute them individually
*/