com php-src: Fixed Bug #63149 Feature missing with system SQLite: ext/sqlite3/config0.m4
| From: | Remi Collet | Date: | Sat, 24 Nov 2012 16:47:51 +0000 |
| Subject: | com php-src: Fixed Bug #63149 Feature missing with system SQLite: ext/sqlite3/config0.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70583@lists.php.net to get a copy of this message | ||
Commit: 67e67c254d25442dc4d98342e53f791b0a710a5a
Author: Remi Collet <remi@php.net> Sat, 24 Nov 2012 17:47:51 +0100
Parents: 88d2b8c5fd0ec4e85e84e6b76fe8660823a65273
Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=67e67c254d25442dc4d98342e53f791b0a710a5a
Log:
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
Bugs:
https://bugs.php.net/63149
Changed paths:
M ext/sqlite3/config0.m4
Diff:
diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4
index ac58b35..1365def 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,
[],