Repository navigation
Conversation
Query shared one module-level empty packet across every connection. writePacket() writes the sequence id into that packet's header, and a socket under backpressure queues the buffer by reference. A second connection sending its own terminator before the first flushed rewrote the queued header, so the server got the wrong sequence id and failed with ER_NET_PACKETS_OUT_OF_ORDER. Fixes sidorares#4568
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4580 +/- ##
=======================================
Coverage 92.90% 92.90%
=======================================
Files 95 95
Lines 16721 16722 +1
Branches 2498 2499 +1
=======================================
+ Hits 15535 15536 +1
Misses 1186 1186
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Harness. π New features to boost your workflow:
|
Owner
|
thanks @jamalkamaladdin ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4568.
lib/commands/query.js: each LOCAL INFILE terminator write gets a new empty packet, in place of one module-level packet for all connections.
test/unit/commands/test-query-infile-terminator.test.mts: two connections with queued writes, each with its own terminator sequence id.
Cases: no stream factory, and a local stream that ends.