summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite
Commit message (Collapse)AuthorAgeFilesLines
* Fix #80027 Terrible performance using $query->fetch on queries with many ↵Matteo Beccati2020-08-311-0/+3
| | | | | | | | | | bind parameters Added new flags that allow skipping param_evt(s) that are not used by drivers, in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite and oci drivers to properly use the new flags. I've left out pdo_dblib, which doesn't have a param_hook, and pdo_firebird, which seems to be using PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
* Fix #64705 errorInfo property of PDOException is null when ↵Ahmed Abdou2020-08-112-2/+18
| | | | | | | | | PDO::__construct() fails PDO driver constructors are throwing PdoException without setting errorInfo, so create a new reusable function that throws exceptions for PDO and will also set the errorInfo. Use this function in pdo_mysql, pdo_sqlite, and pdo_pgsql.
* Report len as -1 instead of INT_MAXNikita Popov2020-07-082-2/+2
| | | | | | | Per docs it should be -1. And would be on 32-bit systems, but not on 64-bit systems. (cherry picked from commit 39111585a2f8e40e72bdc662eb8b2e3c19e93615)
* Fix #79664: PDOStatement::getColumnMeta fails on empty result setChristoph M. Becker2020-06-022-1/+33
| | | | | | | As its name suggests, `sqlite3_data_count` returns the number of columns in the current row of the result set; we are interested in the number of columns regardless of the current row, so we have to use `sqlite3_column_count` instead.
* Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-06-282-2/+88
|\ | | | | | | | | * PHP-7.2: Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
| * Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changedVincent2019-06-282-2/+88
| | | | | | | | Reset stmt->columns when column count changed on new execution of prepared statement
| * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Trim trailing whitespace in *.phptPeter Kokot2018-10-143-6/+6
| |
| * Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. 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
| * Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
| |
* | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Trim trailing whitespace in *.phptPeter Kokot2018-10-143-6/+6
| |
* | Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. 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
* | Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-08-031-1/+5
|\ \ | |/ | | | | | | * PHP-7.2: Improve cleanup
| * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-08-031-1/+5
| |\ | | | | | | | | | | | | * PHP-7.1: Improve cleanup
| | * Improve cleanupAnatol Belski2018-08-031-1/+5
| | | | | | | | | | | | The persistent connection locks the file which might prevent deletion.
| | * year++Xinchen Hui2018-01-025-5/+5
| | |
| | * fixed typoMarkus Staab2017-03-291-1/+1
| | |
| * | year++Xinchen Hui2018-01-025-5/+5
| | |
* | | Remove unused Git attributes identPeter Kokot2018-07-257-13/+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-221-2/+2
| | | | | | | | | | | | | | | | | | 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 zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-4/+4
| | | | | | | | | | | | where we sure about string persistence.
* | | remove support for string|unicode in testsGabriel Caruso2018-02-224-19/+19
| | |
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-209-9/+9
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | year++Xinchen Hui2018-01-025-5/+5
| | |
* | | Turn "pdo_stmt_methods" into constants.Dmitry Stogov2017-12-142-2/+2
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-143-4/+4
| | |
* | | Enable JSON1 for bundled libsqliteMorva Kristóf2017-11-222-2/+2
| | |
* | | Encapsulate reference-counting primitives.Dmitry Stogov2017-10-271-1/+1
| | | | | | | | | | | | | | | | | | Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead. Added mactros to validate reference-counting (disabled for now). These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
* | | Fix test cleanupAnatol Belski2017-09-061-8/+8
| | |
* | | Add support for SQLite open flagsBohwaZ2017-09-064-1/+51
| | |
* | | Get rid of all these old package[2].xml files, most of these had no had a ↵Kalle Sommer Nielsen2017-08-171-203/+0
|/ / | | | | | | | | | | release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl OCI, PDO_OCI and zip are left as they are actively developed and released there
* | fix build with old system libsqlite (sqlite3_close_v2 may be missing)Remi Collet2017-08-022-0/+8
| |
* | Only compute callback name in error casesNikita Popov2017-06-251-11/+9
| | | | | | | | | | Mostly the callback name is only used to report an error. Try to avoid calculating it if no error occurred.
* | Avoid useless dereferences and separations during paramter passing.Dmitry Stogov2017-06-191-4/+4
| |
* | fixed typoMarkus Staab2017-03-291-1/+1
| |
* | Merge branch 'PHP-7.1'Remi Collet2017-03-292-1/+6
|\ \ | |/ | | | | | | * PHP-7.1: Fix buid with system libsqlite, see bug #74217
| * Fix buid with system libsqlite, see bug #74217Remi Collet2017-03-292-1/+6
| | | | | | | | | | | | 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...)
* | Merge branch 'PHP-7.1'Nikita Popov2017-03-123-3/+45
|\ \ | |/
| * Implement FR #74217: deterministic sqlite functionsandrewnester2017-03-123-4/+45
| |
| * Update copyright headers to 2017Sammy Kaye Powers2017-01-045-5/+5
| |
* | Switch to the v2 version of these functions.Rasmus Lerdorf2017-01-221-2/+2
| | | | | | | | | | The sqlite3 docs suggest always using prepare_v2 and the close_v2 could potentially help with an fd leak we have been seeing
* | Update copyright headers to 2017Sammy Kaye Powers2017-01-025-5/+5
| |
* | Use new param API in pdo_sqliteSara Golemon2016-12-311-12/+17
| |
* | Remove more PHP 6 leftovers from testsNikita Popov2016-11-242-4/+4
|/
* Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-11-082-2/+2
|\ | | | | | | | | * PHP-7.0: Enable FTS4 and FTS5 for bundled libsqlite
| * Enable FTS4 and FTS5 for bundled libsqliteAnatol Belski2016-11-082-2/+2
| | | | | | | | | | | | | | FTS3 is already enabled by default, and the other FTS versions seems just to have been missed. Given that, the other FTS plugins look like a low impact so worth a try. The current bundled libsqlite versions in 7.x are proven stable already and support FTS5.
* | Fixed compilation warningsDmitry Stogov2016-06-221-1/+2
| |
* | Merge branch 'PHP-7.0'Anatol Belski2016-05-011-1/+1
|\ \ | |/ | | | | | | | | * PHP-7.0: fix test if unlink fails occasionally fix dir separator in test