Repository navigation
fix(linux-drivers): stop an editor script before its next statement on MySQL, MariaDB and SQLite - #3780
Merged
Conversation
…n MySQL, MariaDB and SQLite Sent whole, MySQL starts the next statement once the last result is written, so a KILL that missed let it run while the run read Cancelled.
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.
Summary
Cancelled.DELIMITERlines still goes as written when it is one statement, or when only the server can find the statement ends: a statement not opened by a known plain keyword (a routine body, a compound statement), a/*!comment, or textsql_modereads its own way (a backslash in a string,[name],$$).SETnow runs under the same watch.TimedOut { server_cancelled }comes from the statement's own 1317 or server timeout, not from the KILL returning OK. A KILL with no answer by the end of the grace ends the session.editor_session::consumer_gone_kills_the_rest_of_the_batchis nowconsumer_gone_sends_nothing_after_the_running_statement, with no 100 MB SELECT; the split test forSELECT 1; SELECT 2now expects two texts.Deliberately not fixed here
/*!...*/comments at a statement's edges, so a dump's/*!40103 SET TIME_ZONE='+00:00' */;never runs. Running them needs catalog refresh and Safe Mode to read them too, and Safe Mode cannot tell where a version-gated/*!NNNNN ... '*/' ... */ends without the server's version.Test plan
editor_session::consumer_gone_sends_nothing_after_the_running_statement,a_stop_whose_kill_is_refused_sends_nothing_after_the_running_statement,a_stop_lands_after_the_server_closed_the_kill_connection,a_deadline_reaches_a_run_still_setting_its_row_limit(MySQL and MariaDB),sessions::a_stop_during_one_statement_runs_nothing_after_it(SQLite).VerifyFullcases that need CI's certificates.Fixes #3766