Repository navigation
fix(mysql): COMMIT/ROLLBACK outside a transaction are OK; TRUNCATE; parenthesized UNION members - #60
Merged
Merged
Conversation
…arenthesized UNION members From the Sendy statement sweep: mysqli_rollback() after a failed statement errored (SQLite: no transaction is active) where MySQL answers OK; TRUNCATE TABLE t did not exist (-> DELETE FROM t, ids restart as in MySQL); (SELECT ...) UNION (SELECT ...) members lose their parentheses, which SQLite rejects.
luthermonson
force-pushed
the
fix/truncate-rollback-union
branch
from
October 27, 2026 22:40
f1d50fd to
c4f5d80
Compare
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.
Three more gaps from the Sendy 7.1.6 statement sweep (MySQL 8.4 vs litewire). Each one makes a statement that MySQL accepts fail on litewire:
mysqli_rollback()/COMMIToutside a transaction returned an error (no transaction is active). MySQL answers OK, and apps call rollback on their error paths. The session now absorbs exactly that one case.TRUNCATE [TABLE] tnow runs asDELETE FROM t. As in MySQL, ids restart at 1 on an emptied rowid table. Affected rows differ: MySQL reports 0, litewire reports the deleted count.(SELECT ...) UNION (SELECT ...): SQLite rejects parenthesized compound members. Members without their own ORDER BY/LIMIT now lose the parentheses.Unit tests are added, and
tests/mysql_migration_forms.rs(rusqlite + Turso) now covers all three.