aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2016-08-13 14:30:23 +0000
committerdan <dan@noemail.net>2016-08-13 14:30:23 +0000
commit0f5a186c4c52f87ffc31d2f6ac06e88e7a76b334 (patch)
treedb3ee14cff315e52cfc56e91a2688468ac3b45cf /src
parent7fb89906880271b5b548a2c3ba5cfba7602daf9d (diff)
downloadsqlite-0f5a186c4c52f87ffc31d2f6ac06e88e7a76b334.tar.gz
sqlite-0f5a186c4c52f87ffc31d2f6ac06e88e7a76b334.zip
Questionable changes to support interruptible checkpoint in ZipVFS.
FossilOrigin-Name: c7a9f26d118c7a453d45fa73efa4d1ab79301659
Diffstat (limited to 'src')
-rw-r--r--src/btree.c7
-rw-r--r--src/sqlite.h.in1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/btree.c b/src/btree.c
index c25c59404..a32745834 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -2398,6 +2398,8 @@ btree_open_out:
sqlite3_free(p);
*ppBtree = 0;
}else{
+ sqlite3_file *pFile;
+
/* If the B-Tree was successfully opened, set the pager-cache size to the
** default value. Except, when opening on an existing shared pager-cache,
** do not change the pager-cache size.
@@ -2405,6 +2407,11 @@ btree_open_out:
if( sqlite3BtreeSchema(p, 0, 0)==0 ){
sqlite3PagerSetCachesize(p->pBt->pPager, SQLITE_DEFAULT_CACHE_SIZE);
}
+
+ pFile = sqlite3PagerFile(pBt->pPager);
+ if( pFile->pMethods ){
+ sqlite3OsFileControlHint(pFile, SQLITE_FCNTL_PDB, (void*)&pBt->db);
+ }
}
if( mutexOpen ){
assert( sqlite3_mutex_held(mutexOpen) );
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 1ee39b679..31e6427b1 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -1026,6 +1026,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_RBU 26
#define SQLITE_FCNTL_VFS_POINTER 27
#define SQLITE_FCNTL_JOURNAL_POINTER 28
+#define SQLITE_FCNTL_PDB 29
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE