Repository navigation
fix: route a statement's diagnostics in driver order (#478) - #491
Merged
Merged
Conversation
A set of diagnostics with an error in it had its info routed at once and only its errors handed back, so 3621 "The statement has been terminated." came before its 2627. Now such a set is routed whole, in driver order, by the error path; a set of info only is routed at once, as before. 'more' is counted over errors only. It also counted info before, which was latent while info and errors were routed apart. In callback mode, info that follows an error is emitted a tick on, after the deferred callback. New scenario errors/two-errors-one-statement. All dup-key-* and scripts/issue-478 are agreed; the Linux pins are reordered and stay known-bug for #483. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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 #478.
Problem:
dispatchInfoReturnErrorsrouted a set's info messages at once and returned only its errors, which were routed later. So 3621 "The statement has been terminated." came before the 2627 it belongs to. Case D already came out in order because it takes another path.Fix (
lib/reader.js)routeStatementErrorcountsmoreover errors only: an error has more when another error follows it, or when the batch goes on. It used to count info too. That was latent while info and errors were routed separately, and would have given the 2627more=true.asCancelledignores info when deciding whether failures are side effects of a cancel.Corpus
errors/two-errors-one-statement(1779more=true, then 1750more=false).dup-key-*transcripts andscripts/issue-478are agreed: error first, then 3621.known-bugfor Linux: when the first statement of a batch fails at execute, the rest of the batch is lost (5.6.0) #483. The replay of the Linux recordings matches them.Found, not fixed (in HANDOVER): info from some DDL statements (1756) is mostly lost, on master too. It is probably native.
Local (Windows): full suite 1072 passing, replay 148 passing.
🤖 Generated with Claude Code