[PHP] Download db.sql before applying MySQL database pulls - #607
Closed
adamziel wants to merge 1 commit into
Closed
Conversation
This was referenced Aug 14, 2026
Contributor
Pull pipeline performance —
|
| Stage | PR | trunk | Δ | Status | Details |
|---|---|---|---|---|---|
playground-sqlite-db-pull |
9.84 s | 9.93 s | ⚪ -95 ms (-1.0%) | ✓ | condition=db-pull in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=lexer native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=selected trunk: condition=db-pull in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=lexer native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=selected |
playground-sqlite-db-apply |
3.83 s | 3.83 s | ⚪ -3 ms (-0.1%) | ✓ | condition=db-apply to SQLite in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=parser native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=verified native_ast=WP_MySQL_Native_Parser_Node sqlite_driver_parser=verified trunk: condition=db-apply to SQLite in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=parser native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=verified native_ast=WP_MySQL_Native_Parser_Node sqlite_driver_parser=verified |
| Total | 13.67 s | 13.76 s | ⚪ -99 ms (-0.7%) |
Numbers carry runner noise; treat single-run deltas as directional, not authoritative.
📈 Trunk performance history — commit-by-commit timeline.
adamziel
force-pushed
the
codex/mysql-db-pull-confirmed-replay
branch
from
August 14, 2026 11:38
34beb98 to
8a382b8
Compare
adamziel
force-pushed
the
codex/resume-database-pull-apply
branch
2 times, most recently
from
August 14, 2026 12:53
c77fa57 to
12d65b5
Compare
adamziel
force-pushed
the
codex/mysql-db-pull-confirmed-replay
branch
from
August 14, 2026 12:55
8a382b8 to
e47499b
Compare
adamziel
force-pushed
the
codex/resume-database-pull-apply
branch
from
August 14, 2026 12:58
12d65b5 to
cfae355
Compare
adamziel
force-pushed
the
codex/mysql-db-pull-confirmed-replay
branch
from
August 14, 2026 12:58
e47499b to
a52093f
Compare
Collaborator
Author
|
Closing this draft. It is being replaced by a smaller target-database checkpoint stack. |
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.
db-pull --sql-output=mysqlnow downloads all ofdb.sqlbefore it changes MySQL.Background
The direct MySQL path executed SQL while it arrived. If that process stopped, the saved source position could not say whether MySQL committed, rolled back, or was still running a query.
This change
MySQL output now uses the database-only pull sequence: preflight, file-backed
db-pull, thendb-apply. The existing MySQL options become target options fordb-apply, and the directmysqli::multi_query()path is removed.A stopped download continues from the last saved file size and source position. MySQL remains untouched until the download finishes. If applying the SQL stops, the next process opens a new connection and starts
db.sqlfrom the beginning. That runs the SQL mode, foreign-key, unique-check, and autocommit settings again.Existing unfinished direct-MySQL work remains rejected instead of being guessed or converted.
This is PR 5 of 5: #590 → #591 → #595 → #582 → #607.
Testing
The focused E2E stops after a file position is saved, checks that MySQL is still untouched, runs the same command again, and compares the finished target with the source. Its tables also require the SQL mode and foreign-key settings from the dump header.