mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix buid with system libsqlite, see bug #74217
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...)
This commit is contained in:
parent
d11211fb53
commit
012dc336a6
4 changed files with 12 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -2283,7 +2283,9 @@ PHP_MINIT_FUNCTION(sqlite3)
|
|||
REGISTER_LONG_CONSTANT("SQLITE3_OPEN_READWRITE", SQLITE_OPEN_READWRITE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("SQLITE3_OPEN_CREATE", SQLITE_OPEN_CREATE, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
#ifdef SQLITE_DETERMINISTIC
|
||||
REGISTER_LONG_CONSTANT("SQLITE3_DETERMINISTIC", SQLITE_DETERMINISTIC, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
--TEST--
|
||||
SQLite3::createFunction - Test with flags
|
||||
--SKIPIF--
|
||||
<?php require_once(__DIR__ . '/skipif.inc'); ?>
|
||||
<?php
|
||||
require_once(__DIR__ . '/skipif.inc');
|
||||
if (!defined('SQLITE3_DETERMINISTIC')) die('skip system sqlite is to old');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue