com php-src: Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqlite: NEWS UPGRADING ext/pdo_sqlite/config.m4 ext/pdo_sqlite/sqlite_d river.c
ext/sqlite3/config0.m4 ext/sqlite3/sqli te3.c

From: Date: Sat, 13 Oct 2018 10:15:58 +0000
Subject: com php-src: Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqlite: NEWS UPGRADING ext/pdo_sqlite/config.m4 ext/pdo_sqlite/sqlite_d river.c
ext/sqlite3/config0.m4 ext/sqlite3/sqli te3.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-103448@lists.php.net to get a copy of this message
Commit: 87392eff1a3b06cad2449dca8dc90942f3721900 Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 13 Oct 2018 12:15:58 +0200 Parents: be2ddc6b6575da0b8e7ed235464f7e23c71674c7 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=87392eff1a3b06cad2449dca8dc90942f3721900 Log: Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqlite It is possible to pass flags when opening an SQLite database. For Sqlite < 3.5.0 these are ignored, since sqlite3_open doesn't support flags. Neither a warning or notice is raised in this case, nor is this behavior documented in the PHP manual. Instead of fixing it either way, we lift the requirement to SQLite 3.5.0 (released on 2007-09-04) instead of the former SQLite 3.3.9 (released on 2007-01-04). Changed paths: M NEWS M UPGRADING M ext/pdo_sqlite/config.m4 M ext/pdo_sqlite/sqlite_driver.c M ext/sqlite3/config0.m4 M ext/sqlite3/sqlite3.c Diff: diff --git a/NEWS b/NEWS index d396212..35591dc 100644 --- a/NEWS +++ b/NEWS @@ -24,9 +24,11 @@ PHP NEWS - PDO_SQLite: . Implemented sqlite_stmt_readonly in PDO_SQLite. (BohwaZ) + . Lifted requirements to SQLite 3.5.0. (cmb) - SQLite3: . Unbundled libsqlite. (cmb) + . Lifted requirements to SQLite 3.5.0. (cmb) - Standard: . Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with diff --git a/UPGRADING b/UPGRADING index 98ceff4..8d3a5eb 100644 --- a/UPGRADING +++ b/UPGRADING @@ -112,7 +112,7 @@ PHP 7.4 UPGRADE NOTES - SQLite3: . The bundled libsqlite has been removed. To build the SQLite3 and/or - PDO_SQLite extensions a system libsqlite3 ≥ 3.3.9 is now required. + PDO_SQLite extensions a system libsqlite3 ≥ 3.5.0 is now required. - Zip: . The bundled libzip library has been removed. A system libzip >= 0.11 is now diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index cb3e7d5..201f9f2 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -52,14 +52,14 @@ if test "$PHP_PDO_SQLITE" != "no"; then PHP_ADD_INCLUDE($PDO_SQLITE_DIR/include) LIBNAME=sqlite3 - LIBSYMBOL=sqlite3_open + LIBSYMBOL=sqlite3_open_v2 PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, [ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_SQLITE_DIR/$PHP_LIBDIR, PDO_SQLITE_SHARED_LIBADD) AC_DEFINE(HAVE_PDO_SQLITELIB,1,[ ]) ],[ - AC_MSG_ERROR([wrong sqlite lib version or lib not found]) + AC_MSG_ERROR([wrong sqlite lib version (< 3.5.0) or lib not found]) ],[ -L$PDO_SQLITE_DIR/$PHP_LIBDIR -lm ]) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 2cc7f72..811f43c 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -809,11 +809,7 @@ static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{ flags = pdo_attr_lval(driver_options, PDO_SQLITE_ATTR_OPEN_FLAGS, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE); -#if SQLITE_VERSION_NUMBER >= 3005000 i = sqlite3_open_v2(filename, &H->db, flags, NULL); -#else - i = sqlite3_open(filename, &H->db); -#endif efree(filename); diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index 6d6fb88..98495da 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -33,14 +33,14 @@ if test $PHP_SQLITE3 != "no"; then AC_MSG_ERROR([Please reinstall the sqlite distribution from http://www.sqlite.org]) fi - AC_MSG_CHECKING([for SQLite 3.3.9+]) - PHP_CHECK_LIBRARY(sqlite3, sqlite3_prepare_v2, [ + AC_MSG_CHECKING([for SQLite 3.5.0+]) + PHP_CHECK_LIBRARY(sqlite3, sqlite3_open_v2, [ AC_MSG_RESULT(found) PHP_ADD_LIBRARY_WITH_PATH(sqlite3, $SQLITE3_DIR/$PHP_LIBDIR, SQLITE3_SHARED_LIBADD) PHP_ADD_INCLUDE($SQLITE3_DIR/include) ],[ AC_MSG_RESULT([not found]) - AC_MSG_ERROR([Please install SQLite 3..3.9 first or check libsqlite3 is present]) + AC_MSG_ERROR([Please install SQLite 3.5.0 first or check libsqlite3 is present]) ],[ -L$SQLITE3_DIR/$PHP_LIBDIR -lm ]) diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index c91aec1..2abf99f 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -131,11 +131,7 @@ PHP_METHOD(sqlite3, open) fullpath = filename; } -#if SQLITE_VERSION_NUMBER >= 3005000 rc = sqlite3_open_v2(fullpath, &(db_obj->db), flags, NULL); -#else - rc = sqlite3_open(fullpath, &(db_obj->db)); -#endif if (rc != SQLITE_OK) { zend_throw_exception_ex(zend_ce_exception, 0, "Unable to open database: %s", #ifdef HAVE_SQLITE3_ERRSTR

« previous php.cvs (#103448) next »