summaryrefslogtreecommitdiff
path: root/ext/sqlite3
Commit message (Collapse)AuthorAgeFilesLines
* Enclose INI values containing {TMP} in quotesChristoph M. Becker2020-03-091-1/+1
| | | | | At least on Windows, the temporary directory may contain tilde signs, which would result in an INI parse error.
* Fix #79294: ::columnType() may fail after SQLite3Stmt::reset()Christoph M. Becker2020-02-213-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | The fix for feature request #53466 did not properly handle resetting of the corresponding statement; the problem with this is that the statement does not know about its result sets. But even if we could fix this, the `complete` handling still appears to be brittle, since the `sqlite3_column_type()`docs[1] state: | If the SQL statement does not currently point to a valid row, or if | the column index is out of range, the result is undefined. Fortunately, we can use `sqlite3_data_count()` instead, since[2]: | If prepared statement P does not have results ready to return (via | calls to the sqlite3_column() family of interfaces) then | sqlite3_data_count(P) returns 0. Thus, we guard `SQLite3::columnType()` with `sqlite3_data_count()`, and completely drop updating the `php_sqlite3_result_object.complete` field, but keep it for ABI BC purposes. [1] <https://www.sqlite.org/c3ref/column_blob.html> [2] <https://www.sqlite.org/c3ref/data_count.html>
* Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-07-093-9741/+21091
|\ | | | | | | | | * PHP-7.2: Upgrade to SQLite 3.28.0
| * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2019-07-093-14202/+33759
| |\ | | | | | | | | | | | | * PHP-7.1: Upgrade to SQLite 3.28.0
| | * Upgrade to SQLite 3.28.0Christoph M. Becker2019-07-093-18036/+42884
| | | | | | | | | | | | | | | | | | | | | | | | Over the years, multiple security vulnerabilities[1] have been found and fixed in SQLite3, so it makes sense to update our bundled libsqlite to the latest available version. [1] <https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html>
* | | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-05-271-0/+9
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix bug #77967 - Bypassing open_basedir restrictions via file uris
| * | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-05-271-0/+9
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix bug #77967 - Bypassing open_basedir restrictions via file uris
| | * Fix bug #77967 - Bypassing open_basedir restrictions via file urisStanislav Malyshev2019-05-271-0/+9
| | |
| | * SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy ↵bohwaz2019-03-113-0/+50
| | | | | | | | | | | | against potential security flaws
| | * 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
| | * Convert CRLF line endings to LFPeter Kokot2018-10-131-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-05-211-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: use {TMP} placeholder in phpt tests
| * | use {TMP} placeholder in phpt testsHolly Li (WIPRO LIMITED)2019-05-211-1/+1
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-03-113-0/+50
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
| * | SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy ↵bohwaz2019-03-113-0/+50
| | | | | | | | | | | | against potential security flaws
* | | 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
* | | 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
| | |
* | | Updated bundled libsqlite to 3.21.0Christoph M. Becker2017-11-073-2678/+3629
| | |
* | | Avoid HashTable allocations for empty arrays (using zend_empty_array).Dmitry Stogov2017-10-241-1/+1
| | |