Skip to content

Commit 67e67c2

Browse files
committed
Fixed Bug #63149 Feature missing with system SQLite
In pdo_sqlite, getColumnMeta should return the table name. With bundled SQLite library, -DSQLITE_ENABLE_COLUMN_METADATA=1 (other_flags) enable the feature in SQLite (function sqlite3_column_table_name). With system SQLite library, this fix detects if sqlite3_column_table_name is available and add SQLITE_ENABLE_COLUMN_METADATA macro to get the same behavior. Test already exists: ext/pdo_sqlite/tests/bug_42589.phpt
1 parent 88d2b8c commit 67e67c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/sqlite3/config0.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ if test $PHP_SQLITE3 != "no"; then
5050
PHP_CHECK_LIBRARY(sqlite3,sqlite3_key,[
5151
AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto support])
5252
])
53+
PHP_CHECK_LIBRARY(sqlite3,sqlite3_column_table_name,[
54+
AC_DEFINE(SQLITE_ENABLE_COLUMN_METADATA, 1, [have sqlite3 with column metadata enabled])
55+
])
5356

5457
PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension,
5558
[],

0 commit comments

Comments
 (0)