From: Remi Collet Date: Sat, 24 Nov 2012 16:47:51 +0000 (+0100) Subject: Fixed Bug #63149 Feature missing with system SQLite X-Git-Tag: php-5.4.10RC1~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67e67c254d25442dc4d98342e53f791b0a710a5a;p=php 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 --- diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index ac58b35cf0..1365def033 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -50,6 +50,9 @@ if test $PHP_SQLITE3 != "no"; then PHP_CHECK_LIBRARY(sqlite3,sqlite3_key,[ AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto support]) ]) + PHP_CHECK_LIBRARY(sqlite3,sqlite3_column_table_name,[ + AC_DEFINE(SQLITE_ENABLE_COLUMN_METADATA, 1, [have sqlite3 with column metadata enabled]) + ]) PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension, [],