Reject invalid BIT column defaults - #487
Merged
Merged
Conversation
Require exact BIT and hexadecimal literal forms during normalization. Reject values that cannot be normalized with MySQL error 1067 so arbitrary strings cannot be stored and emitted as SQL.
JanJakes
marked this pull request as ready for review
August 12, 2026 11:55
Match MySQL by coercing an empty string default to zero and storing it as a canonical bit literal.
Member
Author
|
Pushed the |
JanJakes
added a commit
that referenced
this pull request
Aug 12, 2026
## Release `3.0.0-rc.9` Version bump and changelog update for release `3.0.0-rc.9`. **Changelog draft:** * Reject invalid BIT column defaults ([#487](#487)) * Make Composer packages installable ([#486](#486)) * Remove INET_ATON WordPress dependency ([#485](#485)) * Restore database version support for older WordPress releases ([#484](#484)) * Finalize MySQL-on-SQLite 3.0 refinements ([#482](#482)) * Prefix SQLite-specific constructor options ([#481](#481)) * Unify emulated MySQL server identity ([#479](#479)) * Document the 3.0 driver API ([#477](#477)) * Expand PDO API coverage ([#471](#471)) * Refine the 3.0 API surface ([#469](#469)) * Add ANSI_QUOTES and SQL mode validation ([#452](#452)) **Full changelog:** v3.0.0-rc.8...release/v3.0.0-rc.9 ## Next steps 1. **Review** the changes in this pull request. 2. **Push** any additional edits to this branch (`release/v3.0.0-rc.9`). 3. **Merge** this pull request to complete the release. Merging will automatically build the plugin ZIP and create a [GitHub release](https://github.com/WordPress/sqlite-database-integration/releases). > [!NOTE] > This is a **pre-release**. It will not be deployed to [WordPress.org](https://wordpress.org/plugins/sqlite-database-integration/).
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
Reject invalid
BITcolumn defaults instead of preserving unnormalized input in the emulated information schema. Unsupported values now return MySQL-compatible error 1067.Why
The
BITdefault accepted any value beginning with a valid prefix and stored the original value.SHOW CREATE TABLElater emitted that value without quoting, allowing untrusted text to become executable SQL in a generated MySQL dump.This is a hotfix that requires valid literal forms and rejects anything that cannot be safely normalized. Broader default validation based on the AST and full column definition should be done as a follow-up, also for other types.
This prevents untrusted SQL from being embedded in generated MySQL DDL during migration.