Enable SQLite column metadata#1204
Merged
crazywhalecc merged 1 commit intoJul 7, 2026
Merged
Conversation
Build Unix SQLite with SQLITE_ENABLE_COLUMN_METADATA so the metadata APIs are available on macOS and Linux. Remove the pdo_sqlite configure override that forced PHP to treat sqlite3_column_table_name() as unavailable, and add sanity checks for both SQLite compile options and PDO column metadata.
henderkes
approved these changes
Jul 7, 2026
crazywhalecc
approved these changes
Jul 7, 2026
crazywhalecc
left a comment
Owner
There was a problem hiding this comment.
v3 branch should do this too.
Author
@crazywhalecc Should I open another PR against v3, or would that be cherry-picked from main? |
Owner
Ah v3 is totally refactored version. You need to do similar changes on v3 branch and open another PR. |
Author
|
@crazywhalecc I gave it a shot in #1205. |
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.
What Changed
SQLITE_ENABLE_COLUMN_METADATAfor Unix SQLite builds so macOS/Linux match the existing Windows SQLite Makefile.pdo_sqliteconfigure override that forcedsqlite3_column_table_name=no.Why
SQLITE_ENABLE_COLUMN_METADATAis optional in SQLite, but it is used in almost everylibsqlitedistribution on Linux, macOS, and Windows. When PHP bundled SQLite itself, it used the flag too, and PHP's own test suite covers that flag.When the flag is missing, SQLite does not expose
sqlite3_column_table_name()and PDO then cannot populatePDOStatement::getColumnMeta()['table'], which breaks consumers who rely on this metadata.Evidence
COLUMN_METADATAenabled on macOS, Debian, Fedora, Gentoo, Arch, Termux, FreeBSD, OpenBSD, Homebrew, MacPorts, Nix, Haikuports, and msys2.pdo_sqliteconfigure script probessqlite3_column_table_name()and definesHAVE_SQLITE3_COLUMN_TABLE_NAME; PHP's own PDO SQLite test suite covers that flag.References
SQLITE_ENABLE_COLUMN_METADATAand update SQLite WordPress/wordpress-playground#2948