Closed clue closed 1 year ago
This error situation is a bit harder to reproduce. For example, this can be triggered in a connection by invoking a
KILL QUERY n
query from a second connection. Errors for invalid queries (SELECT unknown
) would still trigger the existing logic.
This can also be reproduced with a simple EXPLAIN SELECT * FROM dual
statement as per per https://dev.mysql.com/doc/internals/en/err-instead-of-eof.html. Any other SELECT 1
statement after this query would previously fail and now works as expected. The SELECT * FROM dual
statement (without EXPLAIN
) returns a proper error without a result set header, so any following statements already work in either case.
This changeset fixes parsing an
ERR
response after a result set. Previously, this would trigger a parser error that would corrupt the entire connection ("Not enough data in buffer").This error situation is a bit harder to reproduce. For example, this can be triggered in a connection by invoking a
KILL QUERY n
query from a second connection. Errors for invalid queries (SELECT unknown
) would still trigger the existing logic.In the following diagram, we already supported the transition from
COM_QUERY_RESPONSE
toERR
just fine. We now also support the transition fromROW
/EOF
toERR
:From https://dev.mysql.com/doc/internals/en/com-query-response.html#text-resultset
Together with the analysis in ticket #123, you're looking at ~8 hours of work, enjoy!
Refs #123