1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add the SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE sqlite3_dbconfig() option - for

disabling SQLite's default checkpoint-on-close behaviour.

FossilOrigin-Name: 093d2fc2288b75c15ccf877bfa0e622d3918a562
This commit is contained in:
dan
2016-10-31 16:16:49 +00:00
parent dadafa881f
commit 298af02308
8 changed files with 89 additions and 13 deletions

View File

@@ -1943,8 +1943,9 @@ int sqlite3WalClose(
**
** The EXCLUSIVE lock is not released before returning.
*/
rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE);
if( rc==SQLITE_OK ){
if( (db->flags & SQLITE_NoCkptOnClose)==0
&& SQLITE_OK==(rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE))
){
if( pWal->exclusiveMode==WAL_NORMAL_MODE ){
pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;
}