diff options
author | Rasmus Lerdorf <rasmus@lerdorf.com> | 2017-01-22 07:26:07 -0800 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@lerdorf.com> | 2017-01-22 07:26:07 -0800 |
commit | 7b8b2e50f6efacb52aed4fa500a16638c56c8ca4 (patch) | |
tree | c93d821e808d9f6e10ce44485604d5382a646712 /ext/pdo_sqlite/sqlite_driver.c | |
parent | 5d0048cd753ee7ae575b590c31bd18e95f7a4339 (diff) | |
download | php-git-7b8b2e50f6efacb52aed4fa500a16638c56c8ca4.tar.gz |
Switch to the v2 version of these functions.
The sqlite3 docs suggest always using prepare_v2 and the close_v2
could potentially help with an fd leak we have been seeing
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r-- | ext/pdo_sqlite/sqlite_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 80b52d550b..c5fd54cfb4 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -161,7 +161,7 @@ static int sqlite_handle_closer(pdo_dbh_t *dbh) /* {{{ */ pdo_sqlite_cleanup_callbacks(H); if (H->db) { - sqlite3_close(H->db); + sqlite3_close_v2(H->db); H->db = NULL; } if (einfo->errmsg) { @@ -193,7 +193,7 @@ static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_le return 0; } - i = sqlite3_prepare(H->db, sql, sql_len, &S->stmt, &tail); + i = sqlite3_prepare_v2(H->db, sql, sql_len, &S->stmt, &tail); if (i == SQLITE_OK) { return 1; } |