MXS-1804: Fix hanging of large session commands

Large session commands weren't properly handled which caused the router to
think that the trailing end of a multi-packet query was actually a new
query.

This cannot be confidently solved in 2.2 which is why the router session
is now closed the moment a large session command is noticed.
This commit is contained in:
Markus Mäkelä
2018-04-17 14:57:54 +03:00
parent 232f807ef3
commit 3a1c2119fb
4 changed files with 67 additions and 12 deletions

View File

@ -217,6 +217,9 @@ SELECT ..INTO variable|OUTFILE|DUMPFILE
SET autocommit=1|0
```
Session commands that are 2²⁴ - 1 bytes or longer are not supported and
cause the session to be closed.
There is a possibility for misbehavior. If `USE mytable` is executed in one of
the slaves and fails, it may be due to replication lag rather than the database
not existing. Thus, the same command may produce different result in different