Sync with upstream trunk (1 commit) - #10
Open
batonac wants to merge 1 commit into
Open
Conversation
## What? Align SQL savepoint handling with MySQL semantics. A standalone `SAVEPOINT` in the default autocommit mode no longer opens an SQLite transaction. It is discarded immediately, so following writes use the normal `BEGIN IMMEDIATE` wrapper and commit independently. Inside explicit transactions, track active savepoint names to emulate MySQL behavior for nested savepoints, reused and case-insensitive names, `ROLLBACK TO`, `RELEASE`, and missing-savepoint error 1305. Missing-savepoint errors leave the surrounding transaction active. Add regression coverage across the MySQL-on-SQLite, concurrency, PDO API, and WordPress integration test suites. ## Why? SQLite treats a standalone `SAVEPOINT` as opening a transaction, but MySQL does not. Passing it through to SQLite created a hidden transaction on PHP versions before 8.4. Subsequent writes then either attempted a nested `BEGIN IMMEDIATE` or bypassed the normal write-locking path, depending on how the transaction state was tracked. The original Data Machine reproduction relied on SQLite-only behavior: issuing a bare `SAVEPOINT`, performing a write, and committing with `RELEASE SAVEPOINT`. Real MySQL and MariaDB discard the standalone savepoint, so the later release reports error 1305. That downstream issue is tracked in Extra-Chill/data-machine#3436. > [!NOTE] > Consumers that relied on a bare `SAVEPOINT` opening a transaction on SQLite must open an explicit transaction instead, matching MySQL behavior. Fixes WordPress#495 --------- Co-authored-by: Jan Jakeš <jan@jakes.pro>
Member
Author
|
This sync does not merge cleanly into
Checks cannot run until this is resolved — GitHub has no merge commit to test. Resolve git fetch origin
git checkout -B upstream-sync origin/upstream-sync
git merge origin/d1-support # resolve the conflicts, then commit
git push origin upstream-sync |
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.
Automated sync of
WordPress/sqlite-database-integration@trunkintod1-support.This pull request tracks every upstream commit that has not landed on
d1-supportyet.It is updated in place as upstream moves, and merges itself once the merge is clean and
every check is green. While it is open, it needs a person.
Upstream commits (1)
Merge conflicts (1 files)
d1-supportcannot absorb these changes automatically, so this branch mirrors theupstream trunk and no checks will run until the conflicts are resolved:
packages/mysql-on-sqlite/src/sqlite/class-wp-mysql-on-sqlite.phpResolve them by merging the base branch into this one:
git fetch origin git checkout -B upstream-sync origin/upstream-sync git merge origin/d1-support # resolve the conflicts, then commit git push origin upstream-syncBranch shape:
mirror. Maintained byupstream-sync.yml. Closing this pull request is not permanent — the next scheduled run reopens it. Disable the workflow to stop the sync.