Conversation
Run the mysql-on-sqlite PHPUnit suite against Doltlite by building https://github.com/dolthub/doltlite from source and installing its shared library as the libsqlite3 resolved by PHP's pdo_sqlite. Keep the CI-only Doltlite compatibility patches in .github/doltlite-patches, with fast workflow reductions that verify each patched behavior before the full PHPUnit run.
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
Runs the mysql-on-sqlite PHPUnit suite against Doltlite, a SQLite fork whose storage engine is a content-addressed prolly tree. The suite passes with the same counts as the local Doltlite verification run: 714 tests, 1,428,233 assertions, 15 skipped, 2 incomplete.
The workflow builds Doltlite from source, swaps the system
libsqlite3for it so PHP'spdo_sqlitetransparently resolves against Doltlite, verifies the swap took effect, and then runs PHPUnit without any filters. The swap replaces the earlierLD_PRELOADapproach;LD_PRELOADloses topdo_sqlite'sDT_NEEDEDbinding onlibsqlite3.so.0.Doltlite currently has four deviations from stock SQLite that break the driver. Each one is addressed by a narrow source-level patch applied before build, paired with a one-shot verify assertion in the workflow that fails fast if the patch stops applying or stops fixing the behavior:
Keep mysql-on-sqlite tables as rowid tables. Doltlite auto-converts ordinary composite/TEXT primary-key tables to
WITHOUT ROWID, but the driver still relies on rowid access for table recreation, limited UPDATE/DELETE rewrites, on-update triggers, zero-column result statements, and metadata reads.Keep merge scans aligned across committed tree rows and transaction-local mutmap entries. Without this, a deleted committed tree entry can still be emitted, and a mutmap-only row can be followed by a stale committed tree row outside the seek prefix.
Strip comments while canonicalizing schema SQL. Without this, rollback after a failed
CHECKinsert can collapse whitespace while preserving--comments, leaving malformedCREATE TABLESQL insqlite_schema.Use the current cursor key for auxiliary index deletes. Without this, deletes through non-key predicates can leave stale unique index entries visible inside the transaction.
Doltlite upstream already includes the previous eqSeen preservation and lossy-collation payload fixes. The workflow still verifies those behaviors so we catch regressions.
The patches are CI-only. Upstreaming them to Doltlite is a separate task.
Test plan
PHPUnit Tests (Doltlite)runs green on this PR.714 tests, 1,428,233 assertions, 15 skipped, 2 incomplete.