Overview of the Issue
When a streaming query in vtgate (workload OLAP, multi-statement, or prepared-statement execution) errors after the first row or field packet has been emitted, vtgate closes the TCP connection and the client sees ERROR 2013 (HY000): Lost connection to MySQL server during query instead of the real error code. The opaque 2013 prevents clients from distinguishing a real connection loss from a legitimate query error, and the connection has to be re-established
Common triggers:
KILL QUERY against an in-flight OLAP session (real error is context canceled (errno 1317))
- Planner validation errors that surface late (e.g.
specifying two different database in the query is not supported)
- Per-shard errors discovered after another shard has already streamed rows
Reproduction Steps
Connect to vtgate and switch to OLAP workload:
SET workload = 'OLAP';
-- Should return the planner error, but client sees 2013 instead
SELECT * FROM information_schema.tables
WHERE table_schema = 'ks1' AND table_schema = 'ks2';
Binary Version
main
Operating System and Environment details
Protocol-level bug, reproducible on any platform
Log Fragments
(none)
Overview of the Issue
When a streaming query in vtgate (workload OLAP, multi-statement, or prepared-statement execution) errors after the first row or field packet has been emitted, vtgate closes the TCP connection and the client sees
ERROR 2013 (HY000): Lost connection to MySQL server during queryinstead of the real error code. The opaque2013prevents clients from distinguishing a real connection loss from a legitimate query error, and the connection has to be re-establishedCommon triggers:
KILL QUERYagainst an in-flight OLAP session (real error iscontext canceled (errno 1317))specifying two different database in the query is not supported)Reproduction Steps
Connect to vtgate and switch to OLAP workload:
Binary Version
main
Operating System and Environment details
Protocol-level bug, reproducible on any platform
Log Fragments
(none)