Skip to content

Commit 29029e8

Browse files
committed
set outer db cache_size after page_size
1 parent 5202e9b commit 29029e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SQLiteNestedVFS.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,6 @@ class VFS : public SQLiteVFS::Wrapper {
10831083
if (unsafe) {
10841084
outer_db->exec(UNSAFE_PRAGMAS);
10851085
}
1086-
auto outer_cache_size = sqlite3_uri_int64(zName, "outer_cache_size", 0);
1087-
if (outer_cache_size) {
1088-
outer_db->exec("PRAGMA cache_size=" + std::to_string(outer_cache_size));
1089-
}
10901086

10911087
// check flags vs whether this appears to be a nested VFS database
10921088
bool is_outer_db = IsOuterDB(*outer_db);
@@ -1108,6 +1104,10 @@ class VFS : public SQLiteVFS::Wrapper {
11081104
txn.commit();
11091105
}
11101106

1107+
auto outer_cache_size = sqlite3_uri_int64(zName, "outer_cache_size", 0);
1108+
if (outer_cache_size) {
1109+
outer_db->exec("PRAGMA cache_size=" + std::to_string(outer_cache_size));
1110+
}
11111111
auto threads = sqlite3_uri_int64(zName, "threads", 1);
11121112
if (threads < 0) {
11131113
threads = sqlite3_int64(std::thread::hardware_concurrency()) - 1;

0 commit comments

Comments
 (0)