summaryrefslogtreecommitdiff
path: root/ext/sqlite3
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Require SQLite ≥ 3.7.4 for ext/sqlite3Christoph M. Becker2018-11-292-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `SQLite3::readOnly()` uses `sqlite3_stmt_readonly()` which is only available as of libsqlite 3.7.4. For older SQLite3 versions we return always `false`, which can be confusing. Instead of sticking with this behavior, or even undefining the method for old SQLite3 versions, we lift the requirements to SQLite 3.7.4 (released on 2010-12-08), according to a respective discussion[1]. Since pdo_sqlite doesn't use `sqlite3_stmt_readonly()`, we stick with the minimum requirement of SQLite 3.5.0. [1] <https://github.com/php/php-src/pull/3614>
* | | | Handle potential sqlite3_bind_*() call failuresChristoph M. Becker2018-11-291-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | Since bug 77051 has been fixed, it is unlikely that any of the `sqlite3_bind_*` calls will ever fail, but we add respective checks nonetheless, and call `php_sqlite3_error()` in case of bind failures.
* | | | Merge branch 'PHP-7.3'Christoph M. Becker2018-11-292-0/+87
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Fix #77051: Issue with re-binding on SQLite3
| * | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-11-292-0/+87
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Fix #77051: Issue with re-binding on SQLite3
| | * | Fix #77051: Issue with re-binding on SQLite3BohwaZ2018-11-292-0/+87
| | | | | | | | | | | | | | | | We have to call `sqlite3_reset()` before re-binding the parameters.
| | * | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-154-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-154-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | | Deny (un)serialization of SQLite3, SQLite3Stmt and SQLite3ResultChristoph M. Becker2018-11-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Serializing `SQLite3`, `SQLite3Stmt` and `SQLite3Result` instances is possible but pointless, since unserializing results in uninitialized instances, which will bail out of any method call. Therefore, we deny serialization and unserialization in the first place.
* | | | Fix typo in testsFabien Villepinte2018-11-192-4/+4
| | | |
* | | | Use ZEND_THIS macro to hide implementation details in extensions code.Dmitry Stogov2018-11-151-33/+33
| | | |
* | | | Replace getThis() by EX(This), when additional check is not necessary.Dmitry Stogov2018-11-141-33/+33
| | | |
* | | | Support SQLite3 @name notationChristoph M. Becker2018-11-112-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides the common `:param` notation to designate named parameters in prepared statements, SQLite3 also supports `@param` and `$param`. While the latter is mostly to support the Tcl programming language, and would be confusing for PHP's sqlite3 binding due to the similarity with string interpolation, the former is common under .NET and raises no such issue. Therefore we add support for it. This patch has been developed in cooperation with @BohwaZ.
* | | | Skip SQLite3::loadExtension tests if SQLITE_OMIT_LOAD_EXTENSION definedMizunashi Mana2018-11-083-3/+21
| | | |
* | | | Avoid needless string duplicationChristoph M. Becker2018-11-071-1/+1
| | | | | | | | | | | | | | | | Cf. <https://github.com/php/php-src/pull/3636#issuecomment-436638833>.
* | | | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-154-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | | Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqliteChristoph M. Becker2018-10-132-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | | Unbundle libsqlite3Christoph M. Becker2018-10-066-231414/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there is no need to patch libsqlite3 for our purposes, and since libsqlite3 ≥ 3.3.9 (which is our current requirement) is widely available on distros, there is no reason anymore to bundle the library. Besides removing the bundled libsqlite, and adapting the configuration respectively, we also fix the use of the SQLITE_ENABLE_COLUMN_METADATA compile time constant to detect whether sqlite3_column_table_name() is available by a working feature detection (otherwise bug_42589.phpt would fail). We also skip bug73068.phpt for libsqlite 3.11.0 to 3.14.1 which have a bug (<https://sqlite.org/src/info/ef360601>). We also completely drop support for the obscure pdo_sqlite_external extension (which could have been enabled on Windows only by passing `--pdo-sqlite-external` to configure), since it is not needed anymore. Furthermore, we remove references to the bundled libsqlite from Makefile.gcov, CONTRIBUTING.md and README.REDIST.BINS.
* | | | Update to SQLite 3.25.1Christoph M. Becker2018-09-192-11/+19
| | | |
* | | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-09-163-3/+3
| | | |
* | | | Update to SQLite 3.25.0Christoph M. Becker2018-09-153-7069/+14487
| | | |
* | | | Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACTDmitry Stogov2018-09-051-3/+3
|/ / /
* | | Merge branch 'PHP-7.2'Christoph M. Becker2018-07-262-1/+20
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-07-262-1/+20
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
| | * Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggleChristoph M. Becker2018-07-262-1/+20
| | | | | | | | | | | | | | | We need to ensure that a zval IS_DOUBLE before we access it as such. In this case we apply common type juggling to do so.
| | * year++Xinchen Hui2018-01-023-3/+3
| | |
| * | year++Xinchen Hui2018-01-023-3/+3
| | |
* | | Remove unused Git attributes identPeter Kokot2018-07-255-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | | Give a reason why the test was skippedGabriel Caruso2018-07-223-4/+4
| | | | | | | | | | | | | | | | | | This will help us debug why a test was skipped in GCOV (http://gcov.php.net/viewer.php?version=PHP_HEAD&func=skip), and maybe put them to run again
* | | Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-4/+4
| | | | | | | | | | | | destroy new created object (This is safer and produces less code)
* | | Remove sqlite and xmlrpc extension versions from phpinfo outputPeter Kokot2018-07-031-1/+0
| | | | | | | | | | | | | | | The rest of the core extensions don't display the extension versions in the phpinfo output since they in most cases match the PHP release version.
* | | Remove unnecessary uses of z/ parametersNikita Popov2018-06-251-2/+2
| | |
* | | Update to SQLite 3.24.0Christoph M. Becker2018-06-053-3469/+5679
| | |
* | | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-3/+3
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-7/+7
| | | | | | | | | | | | where we sure about string persistence.
* | | Update bundled libsqlite to 3.23.1Christoph M. Becker2018-04-102-1278/+1409
| | |
* | | Update bundled libsqlite to 3.23.0Christoph M. Becker2018-04-023-922/+3472
| | |
* | | Remove return types from some magic method in protosGabriel Caruso2018-03-091-2/+2
| | | | | | | | | | | | __construct, __destruct, __wakeup does not have return types defined.
* | | remove support for string|unicode in testsGabriel Caruso2018-02-223-5/+5
| | |
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2015-15/+15
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | Add and fix SKIPIF sectionsGabriel Caruso2018-02-041-2/+2
| | |
* | | Update to SQLite 3.22.0Christoph M. Becker2018-01-223-10311/+12676
| | |
* | | Usee reference-counting instead of duplicationDmitry Stogov2018-01-191-1/+1
| | |
* | | Use stack allocated zvalsXinchen Hui2018-01-071-3/+1
| | |
* | | Trailing whitespaces on ext/*Gabriel Caruso2018-01-042-595/+595
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | Trailing whitespacesGabriel Caruso2018-01-031-6633/+6633
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-023-3/+3
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-3/+3
| | |
* | | Add zend_object_alloc() APINikita Popov2017-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ecalloc() to create objects is expensive, because the dynamic-size memset() is unreasonably slow. Make sure we only zero the main object structure with known size, as the properties are intialized separately anyway. Technically we do not need to zero the embedded zend_object structure either, but as long as the memset argument is constant, a couple more bytes don't really matter.
* | | Enable JSON1 for bundled libsqliteMorva Kristóf2017-11-222-2/+2
| | |