diff options
author | Remi Collet <remi@php.net> | 2017-03-29 07:25:01 +0200 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-03-29 07:54:44 +0100 |
commit | a99cddf1c6cf1b60dd830edbe322b7b692bfd758 (patch) | |
tree | ff217da72b26d67018593f7de3c35e99a0462298 /ext/pdo_sqlite | |
parent | 99d2cd0a324e6592be4b68f6b007703c2c7402c1 (diff) | |
download | php-git-PHP-7.1.4.tar.gz |
Fix buid with system libsqlite, see bug #74217PHP-7.1.4
SQLITE_DETERMINISTIC only exists in recent version
e.g. missing on 3.7 which is the default on RHEL/CentOS-7
and probably others (wheezy have 3.7, jessie 3.8...)
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r-- | ext/pdo_sqlite/pdo_sqlite.c | 2 | ||||
-rw-r--r-- | ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c index 621123b39a..d0eb1823d6 100644 --- a/ext/pdo_sqlite/pdo_sqlite.c +++ b/ext/pdo_sqlite/pdo_sqlite.c @@ -69,7 +69,9 @@ ZEND_GET_MODULE(pdo_sqlite) /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(pdo_sqlite) { +#ifdef SQLITE_DETERMINISTIC REGISTER_PDO_CLASS_CONST_LONG("SQLITE_DETERMINISTIC", (zend_long)SQLITE_DETERMINISTIC); +#endif return php_pdo_register_driver(&pdo_sqlite_driver); } diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt index 4f0b6754a1..d826d93ddf 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt @@ -1,7 +1,10 @@ --TEST-- PDO_sqlite: Testing sqliteCreateFunction() with flags --SKIPIF-- -<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?> +<?php +if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; +if (!defined('PDO::SQLITE_DETERMINISTIC')) die('skip system sqlite is to old'); +?> --FILE-- <?php |