Run MySQL server result tests against the SQLite proxy#438
Open
adamziel wants to merge 9 commits into
Open
Conversation
95610e1 to
6234a00
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.
Summary
This replaces the parser-only direction from the reverted PR with a result-suite workflow that actually executes MySQL server test cases and compares their expected output.
The new workflow downloads Oracle MySQL's 8.0.46 test-suite archive, starts this repository's PHP MySQL proxy backed by the SQLite driver, and runs MySQL's
mysql-test-run.plin--externmode against that proxy. That means the CI signal comes from.testfiles and.resultfiles, not from the existingmysql-server-tests-queries.csvlexer/parser corpus.What Runs
.github/workflows/mysql-server-result-suite.yml.trunkpushes, and by manual dispatch.mariadb-testpackage that hung in CI.cdn.mysql.comand discovers Oracle'smysqltestplusmysql-test-run.plfrom that archive.mysqltestand the packagedmysql/mysqladminclients for MTR.packages/mysql-proxy/bin/wp-mysql-proxy.phpon localhost.mysql-test-run.pl --extern ... --force --parallel=1so the suite keeps collecting result mismatches instead of stopping after the first failure.Proxy Setup
MySQL's test framework expects the default database to be named
testwhen running test cases, and its startup probe also connects to themysqlschema to read server variables. The proxy previously hard-coded its exposed schema name assqlite_database, so this PR adds:--database-name, used in CI as--database-name test.--database-alias, used in CI as--database-alias mysqlso MTR's startup probe can connect.The existing default remains
sqlite_databasefor current users and tests.Known Limitations
mysqlalias is only an alias for MTR compatibility; it does not add real multi-database support.Validation
.github/workflows/mysql-server-result-suite.ymlas YAML.bash -nover every workflowrun:block in the new file.php -lon the changed proxy PHP files.git diff --checkon the workflow and proxy changes.USE test,SELECT DATABASE(), andSELECT 1 AS result.USE mysqlandUSE \mysql``.