Fossil SCM

Update the built-in SQLite to the latest 3.32.0 alpha that includes the fix that omits O_NOFOLLOW when trying to open a directory just to fsync() it.

drh 2020-04-20 17:37 trunk
Commit c435144c700b00e20698bc6487afa4aaacc05c5198e44e1ed3c72e357c625448
3 files changed +31 -8 +24 -29 +3 -2
+31 -8
--- src/shell.c
+++ src/shell.c
@@ -12246,11 +12246,12 @@
1224612246
" --bom Put a UTF8 byte-order mark on intermediate file",
1224712247
".exit ?CODE? Exit this program with return-code CODE",
1224812248
".expert EXPERIMENTAL. Suggest indexes for queries",
1224912249
".explain ?on|off|auto? Change the EXPLAIN formatting mode. Default: auto",
1225012250
".filectrl CMD ... Run various sqlite3_file_control() operations",
12251
- " Run \".filectrl\" with no arguments for details",
12251
+ " --schema SCHEMA Use SCHEMA instead of \"main\"",
12252
+ " --help Show CMD details",
1225212253
".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
1225312254
".headers on|off Turn display of headers on or off",
1225412255
".help ?-all? ?PATTERN? Show help text for PATTERN",
1225512256
".import FILE TABLE Import data from FILE into TABLE",
1225612257
" Options:",
@@ -16147,20 +16148,32 @@
1614716148
{ "psow", SQLITE_FCNTL_POWERSAFE_OVERWRITE, "[BOOLEAN]" },
1614816149
/* { "pragma", SQLITE_FCNTL_PRAGMA, "NAME ARG" },*/
1614916150
{ "tempfilename", SQLITE_FCNTL_TEMPFILENAME, "" },
1615016151
{ "has_moved", SQLITE_FCNTL_HAS_MOVED, "" },
1615116152
{ "lock_timeout", SQLITE_FCNTL_LOCK_TIMEOUT, "MILLISEC" },
16153
+ { "reserve_bytes", SQLITE_FCNTL_RESERVE_BYTES, "[N]" },
1615216154
};
1615316155
int filectrl = -1;
1615416156
int iCtrl = -1;
1615516157
sqlite3_int64 iRes = 0; /* Integer result to display if rc2==1 */
1615616158
int isOk = 0; /* 0: usage 1: %lld 2: no-result */
1615716159
int n2, i;
1615816160
const char *zCmd = 0;
16161
+ const char *zSchema = 0;
1615916162
1616016163
open_db(p, 0);
1616116164
zCmd = nArg>=2 ? azArg[1] : "help";
16165
+
16166
+ if( zCmd[0]=='-'
16167
+ && (strcmp(zCmd,"--schema")==0 || strcmp(zCmd,"-schema")==0)
16168
+ && nArg>=4
16169
+ ){
16170
+ zSchema = azArg[2];
16171
+ for(i=3; i<nArg; i++) azArg[i-2] = azArg[i];
16172
+ nArg -= 2;
16173
+ zCmd = azArg[1];
16174
+ }
1616216175
1616316176
/* The argument can optionally begin with "-" or "--" */
1616416177
if( zCmd[0]=='-' && zCmd[1] ){
1616516178
zCmd++;
1616616179
if( zCmd[0]=='-' && zCmd[1] ) zCmd++;
@@ -16199,51 +16212,63 @@
1619916212
}else{
1620016213
switch(filectrl){
1620116214
case SQLITE_FCNTL_SIZE_LIMIT: {
1620216215
if( nArg!=2 && nArg!=3 ) break;
1620316216
iRes = nArg==3 ? integerValue(azArg[2]) : -1;
16204
- sqlite3_file_control(p->db, 0, SQLITE_FCNTL_SIZE_LIMIT, &iRes);
16217
+ sqlite3_file_control(p->db, zSchema, SQLITE_FCNTL_SIZE_LIMIT, &iRes);
1620516218
isOk = 1;
1620616219
break;
1620716220
}
1620816221
case SQLITE_FCNTL_LOCK_TIMEOUT:
1620916222
case SQLITE_FCNTL_CHUNK_SIZE: {
1621016223
int x;
1621116224
if( nArg!=3 ) break;
1621216225
x = (int)integerValue(azArg[2]);
16213
- sqlite3_file_control(p->db, 0, filectrl, &x);
16226
+ sqlite3_file_control(p->db, zSchema, filectrl, &x);
1621416227
isOk = 2;
1621516228
break;
1621616229
}
1621716230
case SQLITE_FCNTL_PERSIST_WAL:
1621816231
case SQLITE_FCNTL_POWERSAFE_OVERWRITE: {
1621916232
int x;
1622016233
if( nArg!=2 && nArg!=3 ) break;
1622116234
x = nArg==3 ? booleanValue(azArg[2]) : -1;
16222
- sqlite3_file_control(p->db, 0, filectrl, &x);
16235
+ sqlite3_file_control(p->db, zSchema, filectrl, &x);
1622316236
iRes = x;
1622416237
isOk = 1;
1622516238
break;
1622616239
}
1622716240
case SQLITE_FCNTL_HAS_MOVED: {
1622816241
int x;
1622916242
if( nArg!=2 ) break;
16230
- sqlite3_file_control(p->db, 0, filectrl, &x);
16243
+ sqlite3_file_control(p->db, zSchema, filectrl, &x);
1623116244
iRes = x;
1623216245
isOk = 1;
1623316246
break;
1623416247
}
1623516248
case SQLITE_FCNTL_TEMPFILENAME: {
1623616249
char *z = 0;
1623716250
if( nArg!=2 ) break;
16238
- sqlite3_file_control(p->db, 0, filectrl, &z);
16251
+ sqlite3_file_control(p->db, zSchema, filectrl, &z);
1623916252
if( z ){
1624016253
utf8_printf(p->out, "%s\n", z);
1624116254
sqlite3_free(z);
1624216255
}
1624316256
isOk = 2;
1624416257
break;
16258
+ }
16259
+ case SQLITE_FCNTL_RESERVE_BYTES: {
16260
+ int x;
16261
+ if( nArg>=3 ){
16262
+ x = atoi(azArg[2]);
16263
+ sqlite3_file_control(p->db, zSchema, filectrl, &x);
16264
+ }
16265
+ x = -1;
16266
+ sqlite3_file_control(p->db, zSchema, filectrl, &x);
16267
+ utf8_printf(p->out,"%d\n", x);
16268
+ isOk = 2;
16269
+ break;
1624516270
}
1624616271
}
1624716272
}
1624816273
if( isOk==0 && iCtrl>=0 ){
1624916274
utf8_printf(p->out, "Usage: .filectrl %s %s\n", zCmd,aCtrl[iCtrl].zUsage);
@@ -18129,11 +18154,10 @@
1812918154
#endif
1813018155
{ "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE, "OFFSET " },
1813118156
{ "prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE, "" },
1813218157
{ "prng_save", SQLITE_TESTCTRL_PRNG_SAVE, "" },
1813318158
{ "prng_seed", SQLITE_TESTCTRL_PRNG_SEED, "SEED ?db?" },
18134
- { "reserve", SQLITE_TESTCTRL_RESERVE, "BYTES-OF-RESERVE"},
1813518159
};
1813618160
int testctrl = -1;
1813718161
int iCtrl = -1;
1813818162
int rc2 = 0; /* 0: usage. 1: %d 2: %x 3: no-output */
1813918163
int isOk = 0;
@@ -18182,11 +18206,10 @@
1818218206
}else{
1818318207
switch(testctrl){
1818418208
1818518209
/* sqlite3_test_control(int, db, int) */
1818618210
case SQLITE_TESTCTRL_OPTIMIZATIONS:
18187
- case SQLITE_TESTCTRL_RESERVE:
1818818211
if( nArg==3 ){
1818918212
int opt = (int)strtol(azArg[2], 0, 0);
1819018213
rc2 = sqlite3_test_control(testctrl, p->db, opt);
1819118214
isOk = 3;
1819218215
}
1819318216
--- src/shell.c
+++ src/shell.c
@@ -12246,11 +12246,12 @@
12246 " --bom Put a UTF8 byte-order mark on intermediate file",
12247 ".exit ?CODE? Exit this program with return-code CODE",
12248 ".expert EXPERIMENTAL. Suggest indexes for queries",
12249 ".explain ?on|off|auto? Change the EXPLAIN formatting mode. Default: auto",
12250 ".filectrl CMD ... Run various sqlite3_file_control() operations",
12251 " Run \".filectrl\" with no arguments for details",
 
12252 ".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
12253 ".headers on|off Turn display of headers on or off",
12254 ".help ?-all? ?PATTERN? Show help text for PATTERN",
12255 ".import FILE TABLE Import data from FILE into TABLE",
12256 " Options:",
@@ -16147,20 +16148,32 @@
16147 { "psow", SQLITE_FCNTL_POWERSAFE_OVERWRITE, "[BOOLEAN]" },
16148 /* { "pragma", SQLITE_FCNTL_PRAGMA, "NAME ARG" },*/
16149 { "tempfilename", SQLITE_FCNTL_TEMPFILENAME, "" },
16150 { "has_moved", SQLITE_FCNTL_HAS_MOVED, "" },
16151 { "lock_timeout", SQLITE_FCNTL_LOCK_TIMEOUT, "MILLISEC" },
 
16152 };
16153 int filectrl = -1;
16154 int iCtrl = -1;
16155 sqlite3_int64 iRes = 0; /* Integer result to display if rc2==1 */
16156 int isOk = 0; /* 0: usage 1: %lld 2: no-result */
16157 int n2, i;
16158 const char *zCmd = 0;
 
16159
16160 open_db(p, 0);
16161 zCmd = nArg>=2 ? azArg[1] : "help";
 
 
 
 
 
 
 
 
 
 
16162
16163 /* The argument can optionally begin with "-" or "--" */
16164 if( zCmd[0]=='-' && zCmd[1] ){
16165 zCmd++;
16166 if( zCmd[0]=='-' && zCmd[1] ) zCmd++;
@@ -16199,51 +16212,63 @@
16199 }else{
16200 switch(filectrl){
16201 case SQLITE_FCNTL_SIZE_LIMIT: {
16202 if( nArg!=2 && nArg!=3 ) break;
16203 iRes = nArg==3 ? integerValue(azArg[2]) : -1;
16204 sqlite3_file_control(p->db, 0, SQLITE_FCNTL_SIZE_LIMIT, &iRes);
16205 isOk = 1;
16206 break;
16207 }
16208 case SQLITE_FCNTL_LOCK_TIMEOUT:
16209 case SQLITE_FCNTL_CHUNK_SIZE: {
16210 int x;
16211 if( nArg!=3 ) break;
16212 x = (int)integerValue(azArg[2]);
16213 sqlite3_file_control(p->db, 0, filectrl, &x);
16214 isOk = 2;
16215 break;
16216 }
16217 case SQLITE_FCNTL_PERSIST_WAL:
16218 case SQLITE_FCNTL_POWERSAFE_OVERWRITE: {
16219 int x;
16220 if( nArg!=2 && nArg!=3 ) break;
16221 x = nArg==3 ? booleanValue(azArg[2]) : -1;
16222 sqlite3_file_control(p->db, 0, filectrl, &x);
16223 iRes = x;
16224 isOk = 1;
16225 break;
16226 }
16227 case SQLITE_FCNTL_HAS_MOVED: {
16228 int x;
16229 if( nArg!=2 ) break;
16230 sqlite3_file_control(p->db, 0, filectrl, &x);
16231 iRes = x;
16232 isOk = 1;
16233 break;
16234 }
16235 case SQLITE_FCNTL_TEMPFILENAME: {
16236 char *z = 0;
16237 if( nArg!=2 ) break;
16238 sqlite3_file_control(p->db, 0, filectrl, &z);
16239 if( z ){
16240 utf8_printf(p->out, "%s\n", z);
16241 sqlite3_free(z);
16242 }
16243 isOk = 2;
16244 break;
 
 
 
 
 
 
 
 
 
 
 
 
16245 }
16246 }
16247 }
16248 if( isOk==0 && iCtrl>=0 ){
16249 utf8_printf(p->out, "Usage: .filectrl %s %s\n", zCmd,aCtrl[iCtrl].zUsage);
@@ -18129,11 +18154,10 @@
18129 #endif
18130 { "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE, "OFFSET " },
18131 { "prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE, "" },
18132 { "prng_save", SQLITE_TESTCTRL_PRNG_SAVE, "" },
18133 { "prng_seed", SQLITE_TESTCTRL_PRNG_SEED, "SEED ?db?" },
18134 { "reserve", SQLITE_TESTCTRL_RESERVE, "BYTES-OF-RESERVE"},
18135 };
18136 int testctrl = -1;
18137 int iCtrl = -1;
18138 int rc2 = 0; /* 0: usage. 1: %d 2: %x 3: no-output */
18139 int isOk = 0;
@@ -18182,11 +18206,10 @@
18182 }else{
18183 switch(testctrl){
18184
18185 /* sqlite3_test_control(int, db, int) */
18186 case SQLITE_TESTCTRL_OPTIMIZATIONS:
18187 case SQLITE_TESTCTRL_RESERVE:
18188 if( nArg==3 ){
18189 int opt = (int)strtol(azArg[2], 0, 0);
18190 rc2 = sqlite3_test_control(testctrl, p->db, opt);
18191 isOk = 3;
18192 }
18193
--- src/shell.c
+++ src/shell.c
@@ -12246,11 +12246,12 @@
12246 " --bom Put a UTF8 byte-order mark on intermediate file",
12247 ".exit ?CODE? Exit this program with return-code CODE",
12248 ".expert EXPERIMENTAL. Suggest indexes for queries",
12249 ".explain ?on|off|auto? Change the EXPLAIN formatting mode. Default: auto",
12250 ".filectrl CMD ... Run various sqlite3_file_control() operations",
12251 " --schema SCHEMA Use SCHEMA instead of \"main\"",
12252 " --help Show CMD details",
12253 ".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
12254 ".headers on|off Turn display of headers on or off",
12255 ".help ?-all? ?PATTERN? Show help text for PATTERN",
12256 ".import FILE TABLE Import data from FILE into TABLE",
12257 " Options:",
@@ -16147,20 +16148,32 @@
16148 { "psow", SQLITE_FCNTL_POWERSAFE_OVERWRITE, "[BOOLEAN]" },
16149 /* { "pragma", SQLITE_FCNTL_PRAGMA, "NAME ARG" },*/
16150 { "tempfilename", SQLITE_FCNTL_TEMPFILENAME, "" },
16151 { "has_moved", SQLITE_FCNTL_HAS_MOVED, "" },
16152 { "lock_timeout", SQLITE_FCNTL_LOCK_TIMEOUT, "MILLISEC" },
16153 { "reserve_bytes", SQLITE_FCNTL_RESERVE_BYTES, "[N]" },
16154 };
16155 int filectrl = -1;
16156 int iCtrl = -1;
16157 sqlite3_int64 iRes = 0; /* Integer result to display if rc2==1 */
16158 int isOk = 0; /* 0: usage 1: %lld 2: no-result */
16159 int n2, i;
16160 const char *zCmd = 0;
16161 const char *zSchema = 0;
16162
16163 open_db(p, 0);
16164 zCmd = nArg>=2 ? azArg[1] : "help";
16165
16166 if( zCmd[0]=='-'
16167 && (strcmp(zCmd,"--schema")==0 || strcmp(zCmd,"-schema")==0)
16168 && nArg>=4
16169 ){
16170 zSchema = azArg[2];
16171 for(i=3; i<nArg; i++) azArg[i-2] = azArg[i];
16172 nArg -= 2;
16173 zCmd = azArg[1];
16174 }
16175
16176 /* The argument can optionally begin with "-" or "--" */
16177 if( zCmd[0]=='-' && zCmd[1] ){
16178 zCmd++;
16179 if( zCmd[0]=='-' && zCmd[1] ) zCmd++;
@@ -16199,51 +16212,63 @@
16212 }else{
16213 switch(filectrl){
16214 case SQLITE_FCNTL_SIZE_LIMIT: {
16215 if( nArg!=2 && nArg!=3 ) break;
16216 iRes = nArg==3 ? integerValue(azArg[2]) : -1;
16217 sqlite3_file_control(p->db, zSchema, SQLITE_FCNTL_SIZE_LIMIT, &iRes);
16218 isOk = 1;
16219 break;
16220 }
16221 case SQLITE_FCNTL_LOCK_TIMEOUT:
16222 case SQLITE_FCNTL_CHUNK_SIZE: {
16223 int x;
16224 if( nArg!=3 ) break;
16225 x = (int)integerValue(azArg[2]);
16226 sqlite3_file_control(p->db, zSchema, filectrl, &x);
16227 isOk = 2;
16228 break;
16229 }
16230 case SQLITE_FCNTL_PERSIST_WAL:
16231 case SQLITE_FCNTL_POWERSAFE_OVERWRITE: {
16232 int x;
16233 if( nArg!=2 && nArg!=3 ) break;
16234 x = nArg==3 ? booleanValue(azArg[2]) : -1;
16235 sqlite3_file_control(p->db, zSchema, filectrl, &x);
16236 iRes = x;
16237 isOk = 1;
16238 break;
16239 }
16240 case SQLITE_FCNTL_HAS_MOVED: {
16241 int x;
16242 if( nArg!=2 ) break;
16243 sqlite3_file_control(p->db, zSchema, filectrl, &x);
16244 iRes = x;
16245 isOk = 1;
16246 break;
16247 }
16248 case SQLITE_FCNTL_TEMPFILENAME: {
16249 char *z = 0;
16250 if( nArg!=2 ) break;
16251 sqlite3_file_control(p->db, zSchema, filectrl, &z);
16252 if( z ){
16253 utf8_printf(p->out, "%s\n", z);
16254 sqlite3_free(z);
16255 }
16256 isOk = 2;
16257 break;
16258 }
16259 case SQLITE_FCNTL_RESERVE_BYTES: {
16260 int x;
16261 if( nArg>=3 ){
16262 x = atoi(azArg[2]);
16263 sqlite3_file_control(p->db, zSchema, filectrl, &x);
16264 }
16265 x = -1;
16266 sqlite3_file_control(p->db, zSchema, filectrl, &x);
16267 utf8_printf(p->out,"%d\n", x);
16268 isOk = 2;
16269 break;
16270 }
16271 }
16272 }
16273 if( isOk==0 && iCtrl>=0 ){
16274 utf8_printf(p->out, "Usage: .filectrl %s %s\n", zCmd,aCtrl[iCtrl].zUsage);
@@ -18129,11 +18154,10 @@
18154 #endif
18155 { "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE, "OFFSET " },
18156 { "prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE, "" },
18157 { "prng_save", SQLITE_TESTCTRL_PRNG_SAVE, "" },
18158 { "prng_seed", SQLITE_TESTCTRL_PRNG_SEED, "SEED ?db?" },
 
18159 };
18160 int testctrl = -1;
18161 int iCtrl = -1;
18162 int rc2 = 0; /* 0: usage. 1: %d 2: %x 3: no-output */
18163 int isOk = 0;
@@ -18182,11 +18206,10 @@
18206 }else{
18207 switch(testctrl){
18208
18209 /* sqlite3_test_control(int, db, int) */
18210 case SQLITE_TESTCTRL_OPTIMIZATIONS:
 
18211 if( nArg==3 ){
18212 int opt = (int)strtol(azArg[2], 0, 0);
18213 rc2 = sqlite3_test_control(testctrl, p->db, opt);
18214 isOk = 3;
18215 }
18216
+24 -29
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
11621162
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11631163
** [sqlite_version()] and [sqlite_source_id()].
11641164
*/
11651165
#define SQLITE_VERSION "3.32.0"
11661166
#define SQLITE_VERSION_NUMBER 3032000
1167
-#define SQLITE_SOURCE_ID "2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c"
1167
+#define SQLITE_SOURCE_ID "2020-04-20 17:35:32 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0926b"
11681168
11691169
/*
11701170
** CAPI3REF: Run-Time Library Version Numbers
11711171
** KEYWORDS: sqlite3_version sqlite3_sourceid
11721172
**
@@ -2194,10 +2194,11 @@
21942194
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
21952195
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
21962196
#define SQLITE_FCNTL_DATA_VERSION 35
21972197
#define SQLITE_FCNTL_SIZE_LIMIT 36
21982198
#define SQLITE_FCNTL_CKPT_DONE 37
2199
+#define SQLITE_FCNTL_RESERVE_BYTES 38
21992200
22002201
/* deprecated names */
22012202
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
22022203
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
22032204
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -8689,11 +8690,11 @@
86898690
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
86908691
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
86918692
#define SQLITE_TESTCTRL_PENDING_BYTE 11
86928693
#define SQLITE_TESTCTRL_ASSERT 12
86938694
#define SQLITE_TESTCTRL_ALWAYS 13
8694
-#define SQLITE_TESTCTRL_RESERVE 14
8695
+#define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
86958696
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
86968697
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
86978698
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
86988699
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
86998700
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
@@ -14759,11 +14760,11 @@
1475914760
SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
1476014761
SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
1476114762
SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
1476214763
SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*);
1476314764
SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int);
14764
-SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree*);
14765
+SQLITE_PRIVATE int sqlite3BtreeGetRequestedReserve(Btree*);
1476514766
SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p);
1476614767
SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);
1476714768
SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);
1476814769
SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int,int*);
1476914770
SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
@@ -37047,11 +37048,11 @@
3704737048
zDirname[ii] = '\0';
3704837049
}else{
3704937050
if( zDirname[0]!='/' ) zDirname[0] = '.';
3705037051
zDirname[1] = 0;
3705137052
}
37052
- fd = robust_open(zDirname, O_RDONLY|O_BINARY|O_NOFOLLOW, 0);
37053
+ fd = robust_open(zDirname, O_RDONLY|O_BINARY, 0);
3705337054
if( fd>=0 ){
3705437055
OSTRACE(("OPENDIR %-3d %s\n", fd, zDirname));
3705537056
}
3705637057
*pFd = fd;
3705737058
if( fd>=0 ) return SQLITE_OK;
@@ -63461,10 +63462,11 @@
6346163462
u8 incrVacuum; /* True if incr-vacuum is enabled */
6346263463
u8 bDoTruncate; /* True to truncate db on commit */
6346363464
#endif
6346463465
u8 inTransaction; /* Transaction state */
6346563466
u8 max1bytePayload; /* Maximum first byte of cell for a 1-byte payload */
63467
+ u8 nReserveWanted; /* 1 more than desired number of extra bytes per page */
6346663468
u16 btsFlags; /* Boolean parameters. See BTS_* macros below */
6346763469
u16 maxLocal; /* Maximum local payload in non-LEAFDATA tables */
6346863470
u16 minLocal; /* Minimum local payload in non-LEAFDATA tables */
6346963471
u16 maxLeaf; /* Maximum local payload in a LEAFDATA table */
6347063472
u16 minLeaf; /* Minimum local payload in a LEAFDATA table */
@@ -66907,12 +66909,15 @@
6690766909
** and autovacuum mode can no longer be changed.
6690866910
*/
6690966911
SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
6691066912
int rc = SQLITE_OK;
6691166913
BtShared *pBt = p->pBt;
66912
- assert( nReserve>=-1 && nReserve<=255 );
66914
+ assert( nReserve>=-1 && nReserve<=254 );
6691366915
sqlite3BtreeEnter(p);
66916
+ if( nReserve>=0 ){
66917
+ pBt->nReserveWanted = nReserve + 1;
66918
+ }
6691466919
if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){
6691566920
sqlite3BtreeLeave(p);
6691666921
return SQLITE_READONLY;
6691766922
}
6691866923
if( nReserve<0 ){
@@ -66960,19 +66965,16 @@
6696066965
6696166966
/*
6696266967
** Return the number of bytes of space at the end of every page that
6696366968
** are intentually left unused. This is the "reserved" space that is
6696466969
** sometimes used by extensions.
66965
-**
66966
-** If SQLITE_HAS_MUTEX is defined then the number returned is the
66967
-** greater of the current reserved space and the maximum requested
66968
-** reserve space.
6696966970
*/
66970
-SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree *p){
66971
+SQLITE_PRIVATE int sqlite3BtreeGetRequestedReserve(Btree *p){
6697166972
int n;
6697266973
sqlite3BtreeEnter(p);
66973
- n = sqlite3BtreeGetReserveNoMutex(p);
66974
+ n = ((int)p->pBt->nReserveWanted) - 1;
66975
+ if( n<0 ) n = sqlite3BtreeGetReserveNoMutex(p);
6697466976
sqlite3BtreeLeave(p);
6697566977
return n;
6697666978
}
6697766979
6697866980
@@ -137706,11 +137708,11 @@
137706137708
sqlite3SetString(pzErrMsg, db, "output file already exists");
137707137709
goto end_of_vacuum;
137708137710
}
137709137711
db->mDbFlags |= DBFLAG_VacuumInto;
137710137712
}
137711
- nRes = sqlite3BtreeGetOptimalReserve(pMain);
137713
+ nRes = sqlite3BtreeGetRequestedReserve(pMain);
137712137714
137713137715
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
137714137716
sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
137715137717
sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
137716137718
@@ -163070,10 +163072,17 @@
163070163072
}else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
163071163073
*(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
163072163074
rc = SQLITE_OK;
163073163075
}else if( op==SQLITE_FCNTL_DATA_VERSION ){
163074163076
*(unsigned int*)pArg = sqlite3PagerDataVersion(pPager);
163077
+ rc = SQLITE_OK;
163078
+ }else if( op==SQLITE_FCNTL_RESERVE_BYTES ){
163079
+ int iNew = *(int*)pArg;
163080
+ *(int*)pArg = sqlite3BtreeGetRequestedReserve(pBtree);
163081
+ if( iNew>=0 && iNew<=254 ){
163082
+ sqlite3BtreeSetPageSize(pBtree, 0, iNew, 0);
163083
+ }
163075163084
rc = SQLITE_OK;
163076163085
}else{
163077163086
rc = sqlite3OsFileControl(fd, op, pArg);
163078163087
}
163079163088
sqlite3BtreeLeave(pBtree);
@@ -163287,24 +163296,10 @@
163287163296
case SQLITE_TESTCTRL_BYTEORDER: {
163288163297
rc = SQLITE_BYTEORDER*100 + SQLITE_LITTLEENDIAN*10 + SQLITE_BIGENDIAN;
163289163298
break;
163290163299
}
163291163300
163292
- /* sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
163293
- **
163294
- ** Set the nReserve size to N for the main database on the database
163295
- ** connection db.
163296
- */
163297
- case SQLITE_TESTCTRL_RESERVE: {
163298
- sqlite3 *db = va_arg(ap, sqlite3*);
163299
- int x = va_arg(ap,int);
163300
- sqlite3_mutex_enter(db->mutex);
163301
- sqlite3BtreeSetPageSize(db->aDb[0].pBt, 0, x, 0);
163302
- sqlite3_mutex_leave(db->mutex);
163303
- break;
163304
- }
163305
-
163306163301
/* sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
163307163302
**
163308163303
** Enable or disable various optimizations for testing purposes. The
163309163304
** argument N is a bitmask of optimizations to be disabled. For normal
163310163305
** operation N should be 0. The idea is that a test program (like the
@@ -223906,11 +223901,11 @@
223906223901
int nArg, /* Number of args */
223907223902
sqlite3_value **apUnused /* Function arguments */
223908223903
){
223909223904
assert( nArg==0 );
223910223905
UNUSED_PARAM2(nArg, apUnused);
223911
- sqlite3_result_text(pCtx, "fts5: 2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c", -1, SQLITE_TRANSIENT);
223906
+ sqlite3_result_text(pCtx, "fts5: 2020-03-03 20:04:29 bd94d7d052734460904c687756231f8aa243a2252f07f742dd1e437aa940f536", -1, SQLITE_TRANSIENT);
223912223907
}
223913223908
223914223909
/*
223915223910
** Return true if zName is the extension on one of the shadow tables used
223916223911
** by this module.
@@ -228688,12 +228683,12 @@
228688228683
}
228689228684
#endif /* SQLITE_CORE */
228690228685
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
228691228686
228692228687
/************** End of stmt.c ************************************************/
228693
-#if __LINE__!=228693
228688
+#if __LINE__!=228688
228694228689
#undef SQLITE_SOURCE_ID
228695
-#define SQLITE_SOURCE_ID "2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3ealt2"
228690
+#define SQLITE_SOURCE_ID "2020-04-20 17:35:32 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0alt2"
228696228691
#endif
228697228692
/* Return the source-id for this library */
228698228693
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
228699228694
/************************** End of sqlite3.c ******************************/
228700228695
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.32.0"
1166 #define SQLITE_VERSION_NUMBER 3032000
1167 #define SQLITE_SOURCE_ID "2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -2194,10 +2194,11 @@
2194 #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
2195 #define SQLITE_FCNTL_LOCK_TIMEOUT 34
2196 #define SQLITE_FCNTL_DATA_VERSION 35
2197 #define SQLITE_FCNTL_SIZE_LIMIT 36
2198 #define SQLITE_FCNTL_CKPT_DONE 37
 
2199
2200 /* deprecated names */
2201 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
2202 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
2203 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -8689,11 +8690,11 @@
8689 #define SQLITE_TESTCTRL_FAULT_INSTALL 9
8690 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
8691 #define SQLITE_TESTCTRL_PENDING_BYTE 11
8692 #define SQLITE_TESTCTRL_ASSERT 12
8693 #define SQLITE_TESTCTRL_ALWAYS 13
8694 #define SQLITE_TESTCTRL_RESERVE 14
8695 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8696 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8697 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8698 #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8699 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
@@ -14759,11 +14760,11 @@
14759 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
14760 SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
14761 SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
14762 SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*);
14763 SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int);
14764 SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree*);
14765 SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p);
14766 SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);
14767 SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);
14768 SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int,int*);
14769 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
@@ -37047,11 +37048,11 @@
37047 zDirname[ii] = '\0';
37048 }else{
37049 if( zDirname[0]!='/' ) zDirname[0] = '.';
37050 zDirname[1] = 0;
37051 }
37052 fd = robust_open(zDirname, O_RDONLY|O_BINARY|O_NOFOLLOW, 0);
37053 if( fd>=0 ){
37054 OSTRACE(("OPENDIR %-3d %s\n", fd, zDirname));
37055 }
37056 *pFd = fd;
37057 if( fd>=0 ) return SQLITE_OK;
@@ -63461,10 +63462,11 @@
63461 u8 incrVacuum; /* True if incr-vacuum is enabled */
63462 u8 bDoTruncate; /* True to truncate db on commit */
63463 #endif
63464 u8 inTransaction; /* Transaction state */
63465 u8 max1bytePayload; /* Maximum first byte of cell for a 1-byte payload */
 
63466 u16 btsFlags; /* Boolean parameters. See BTS_* macros below */
63467 u16 maxLocal; /* Maximum local payload in non-LEAFDATA tables */
63468 u16 minLocal; /* Minimum local payload in non-LEAFDATA tables */
63469 u16 maxLeaf; /* Maximum local payload in a LEAFDATA table */
63470 u16 minLeaf; /* Minimum local payload in a LEAFDATA table */
@@ -66907,12 +66909,15 @@
66907 ** and autovacuum mode can no longer be changed.
66908 */
66909 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
66910 int rc = SQLITE_OK;
66911 BtShared *pBt = p->pBt;
66912 assert( nReserve>=-1 && nReserve<=255 );
66913 sqlite3BtreeEnter(p);
 
 
 
66914 if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){
66915 sqlite3BtreeLeave(p);
66916 return SQLITE_READONLY;
66917 }
66918 if( nReserve<0 ){
@@ -66960,19 +66965,16 @@
66960
66961 /*
66962 ** Return the number of bytes of space at the end of every page that
66963 ** are intentually left unused. This is the "reserved" space that is
66964 ** sometimes used by extensions.
66965 **
66966 ** If SQLITE_HAS_MUTEX is defined then the number returned is the
66967 ** greater of the current reserved space and the maximum requested
66968 ** reserve space.
66969 */
66970 SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree *p){
66971 int n;
66972 sqlite3BtreeEnter(p);
66973 n = sqlite3BtreeGetReserveNoMutex(p);
 
66974 sqlite3BtreeLeave(p);
66975 return n;
66976 }
66977
66978
@@ -137706,11 +137708,11 @@
137706 sqlite3SetString(pzErrMsg, db, "output file already exists");
137707 goto end_of_vacuum;
137708 }
137709 db->mDbFlags |= DBFLAG_VacuumInto;
137710 }
137711 nRes = sqlite3BtreeGetOptimalReserve(pMain);
137712
137713 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
137714 sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
137715 sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
137716
@@ -163070,10 +163072,17 @@
163070 }else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
163071 *(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
163072 rc = SQLITE_OK;
163073 }else if( op==SQLITE_FCNTL_DATA_VERSION ){
163074 *(unsigned int*)pArg = sqlite3PagerDataVersion(pPager);
 
 
 
 
 
 
 
163075 rc = SQLITE_OK;
163076 }else{
163077 rc = sqlite3OsFileControl(fd, op, pArg);
163078 }
163079 sqlite3BtreeLeave(pBtree);
@@ -163287,24 +163296,10 @@
163287 case SQLITE_TESTCTRL_BYTEORDER: {
163288 rc = SQLITE_BYTEORDER*100 + SQLITE_LITTLEENDIAN*10 + SQLITE_BIGENDIAN;
163289 break;
163290 }
163291
163292 /* sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
163293 **
163294 ** Set the nReserve size to N for the main database on the database
163295 ** connection db.
163296 */
163297 case SQLITE_TESTCTRL_RESERVE: {
163298 sqlite3 *db = va_arg(ap, sqlite3*);
163299 int x = va_arg(ap,int);
163300 sqlite3_mutex_enter(db->mutex);
163301 sqlite3BtreeSetPageSize(db->aDb[0].pBt, 0, x, 0);
163302 sqlite3_mutex_leave(db->mutex);
163303 break;
163304 }
163305
163306 /* sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
163307 **
163308 ** Enable or disable various optimizations for testing purposes. The
163309 ** argument N is a bitmask of optimizations to be disabled. For normal
163310 ** operation N should be 0. The idea is that a test program (like the
@@ -223906,11 +223901,11 @@
223906 int nArg, /* Number of args */
223907 sqlite3_value **apUnused /* Function arguments */
223908 ){
223909 assert( nArg==0 );
223910 UNUSED_PARAM2(nArg, apUnused);
223911 sqlite3_result_text(pCtx, "fts5: 2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c", -1, SQLITE_TRANSIENT);
223912 }
223913
223914 /*
223915 ** Return true if zName is the extension on one of the shadow tables used
223916 ** by this module.
@@ -228688,12 +228683,12 @@
228688 }
228689 #endif /* SQLITE_CORE */
228690 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
228691
228692 /************** End of stmt.c ************************************************/
228693 #if __LINE__!=228693
228694 #undef SQLITE_SOURCE_ID
228695 #define SQLITE_SOURCE_ID "2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3ealt2"
228696 #endif
228697 /* Return the source-id for this library */
228698 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
228699 /************************** End of sqlite3.c ******************************/
228700
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.32.0"
1166 #define SQLITE_VERSION_NUMBER 3032000
1167 #define SQLITE_SOURCE_ID "2020-04-20 17:35:32 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0926b"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -2194,10 +2194,11 @@
2194 #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
2195 #define SQLITE_FCNTL_LOCK_TIMEOUT 34
2196 #define SQLITE_FCNTL_DATA_VERSION 35
2197 #define SQLITE_FCNTL_SIZE_LIMIT 36
2198 #define SQLITE_FCNTL_CKPT_DONE 37
2199 #define SQLITE_FCNTL_RESERVE_BYTES 38
2200
2201 /* deprecated names */
2202 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
2203 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
2204 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -8689,11 +8690,11 @@
8690 #define SQLITE_TESTCTRL_FAULT_INSTALL 9
8691 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
8692 #define SQLITE_TESTCTRL_PENDING_BYTE 11
8693 #define SQLITE_TESTCTRL_ASSERT 12
8694 #define SQLITE_TESTCTRL_ALWAYS 13
8695 #define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
8696 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8697 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8698 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8699 #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8700 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
@@ -14759,11 +14760,11 @@
14760 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
14761 SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
14762 SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
14763 SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*);
14764 SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int);
14765 SQLITE_PRIVATE int sqlite3BtreeGetRequestedReserve(Btree*);
14766 SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p);
14767 SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);
14768 SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);
14769 SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int,int*);
14770 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
@@ -37047,11 +37048,11 @@
37048 zDirname[ii] = '\0';
37049 }else{
37050 if( zDirname[0]!='/' ) zDirname[0] = '.';
37051 zDirname[1] = 0;
37052 }
37053 fd = robust_open(zDirname, O_RDONLY|O_BINARY, 0);
37054 if( fd>=0 ){
37055 OSTRACE(("OPENDIR %-3d %s\n", fd, zDirname));
37056 }
37057 *pFd = fd;
37058 if( fd>=0 ) return SQLITE_OK;
@@ -63461,10 +63462,11 @@
63462 u8 incrVacuum; /* True if incr-vacuum is enabled */
63463 u8 bDoTruncate; /* True to truncate db on commit */
63464 #endif
63465 u8 inTransaction; /* Transaction state */
63466 u8 max1bytePayload; /* Maximum first byte of cell for a 1-byte payload */
63467 u8 nReserveWanted; /* 1 more than desired number of extra bytes per page */
63468 u16 btsFlags; /* Boolean parameters. See BTS_* macros below */
63469 u16 maxLocal; /* Maximum local payload in non-LEAFDATA tables */
63470 u16 minLocal; /* Minimum local payload in non-LEAFDATA tables */
63471 u16 maxLeaf; /* Maximum local payload in a LEAFDATA table */
63472 u16 minLeaf; /* Minimum local payload in a LEAFDATA table */
@@ -66907,12 +66909,15 @@
66909 ** and autovacuum mode can no longer be changed.
66910 */
66911 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
66912 int rc = SQLITE_OK;
66913 BtShared *pBt = p->pBt;
66914 assert( nReserve>=-1 && nReserve<=254 );
66915 sqlite3BtreeEnter(p);
66916 if( nReserve>=0 ){
66917 pBt->nReserveWanted = nReserve + 1;
66918 }
66919 if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){
66920 sqlite3BtreeLeave(p);
66921 return SQLITE_READONLY;
66922 }
66923 if( nReserve<0 ){
@@ -66960,19 +66965,16 @@
66965
66966 /*
66967 ** Return the number of bytes of space at the end of every page that
66968 ** are intentually left unused. This is the "reserved" space that is
66969 ** sometimes used by extensions.
 
 
 
 
66970 */
66971 SQLITE_PRIVATE int sqlite3BtreeGetRequestedReserve(Btree *p){
66972 int n;
66973 sqlite3BtreeEnter(p);
66974 n = ((int)p->pBt->nReserveWanted) - 1;
66975 if( n<0 ) n = sqlite3BtreeGetReserveNoMutex(p);
66976 sqlite3BtreeLeave(p);
66977 return n;
66978 }
66979
66980
@@ -137706,11 +137708,11 @@
137708 sqlite3SetString(pzErrMsg, db, "output file already exists");
137709 goto end_of_vacuum;
137710 }
137711 db->mDbFlags |= DBFLAG_VacuumInto;
137712 }
137713 nRes = sqlite3BtreeGetRequestedReserve(pMain);
137714
137715 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
137716 sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
137717 sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
137718
@@ -163070,10 +163072,17 @@
163072 }else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
163073 *(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
163074 rc = SQLITE_OK;
163075 }else if( op==SQLITE_FCNTL_DATA_VERSION ){
163076 *(unsigned int*)pArg = sqlite3PagerDataVersion(pPager);
163077 rc = SQLITE_OK;
163078 }else if( op==SQLITE_FCNTL_RESERVE_BYTES ){
163079 int iNew = *(int*)pArg;
163080 *(int*)pArg = sqlite3BtreeGetRequestedReserve(pBtree);
163081 if( iNew>=0 && iNew<=254 ){
163082 sqlite3BtreeSetPageSize(pBtree, 0, iNew, 0);
163083 }
163084 rc = SQLITE_OK;
163085 }else{
163086 rc = sqlite3OsFileControl(fd, op, pArg);
163087 }
163088 sqlite3BtreeLeave(pBtree);
@@ -163287,24 +163296,10 @@
163296 case SQLITE_TESTCTRL_BYTEORDER: {
163297 rc = SQLITE_BYTEORDER*100 + SQLITE_LITTLEENDIAN*10 + SQLITE_BIGENDIAN;
163298 break;
163299 }
163300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163301 /* sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
163302 **
163303 ** Enable or disable various optimizations for testing purposes. The
163304 ** argument N is a bitmask of optimizations to be disabled. For normal
163305 ** operation N should be 0. The idea is that a test program (like the
@@ -223906,11 +223901,11 @@
223901 int nArg, /* Number of args */
223902 sqlite3_value **apUnused /* Function arguments */
223903 ){
223904 assert( nArg==0 );
223905 UNUSED_PARAM2(nArg, apUnused);
223906 sqlite3_result_text(pCtx, "fts5: 2020-03-03 20:04:29 bd94d7d052734460904c687756231f8aa243a2252f07f742dd1e437aa940f536", -1, SQLITE_TRANSIENT);
223907 }
223908
223909 /*
223910 ** Return true if zName is the extension on one of the shadow tables used
223911 ** by this module.
@@ -228688,12 +228683,12 @@
228683 }
228684 #endif /* SQLITE_CORE */
228685 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
228686
228687 /************** End of stmt.c ************************************************/
228688 #if __LINE__!=228688
228689 #undef SQLITE_SOURCE_ID
228690 #define SQLITE_SOURCE_ID "2020-04-20 17:35:32 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0alt2"
228691 #endif
228692 /* Return the source-id for this library */
228693 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
228694 /************************** End of sqlite3.c ******************************/
228695
+3 -2
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123123
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124124
** [sqlite_version()] and [sqlite_source_id()].
125125
*/
126126
#define SQLITE_VERSION "3.32.0"
127127
#define SQLITE_VERSION_NUMBER 3032000
128
-#define SQLITE_SOURCE_ID "2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c"
128
+#define SQLITE_SOURCE_ID "2020-04-20 17:35:32 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0926b"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
@@ -1155,10 +1155,11 @@
11551155
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
11561156
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
11571157
#define SQLITE_FCNTL_DATA_VERSION 35
11581158
#define SQLITE_FCNTL_SIZE_LIMIT 36
11591159
#define SQLITE_FCNTL_CKPT_DONE 37
1160
+#define SQLITE_FCNTL_RESERVE_BYTES 38
11601161
11611162
/* deprecated names */
11621163
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
11631164
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
11641165
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -7650,11 +7651,11 @@
76507651
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
76517652
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
76527653
#define SQLITE_TESTCTRL_PENDING_BYTE 11
76537654
#define SQLITE_TESTCTRL_ASSERT 12
76547655
#define SQLITE_TESTCTRL_ALWAYS 13
7655
-#define SQLITE_TESTCTRL_RESERVE 14
7656
+#define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
76567657
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
76577658
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
76587659
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
76597660
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
76607661
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
76617662
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.32.0"
127 #define SQLITE_VERSION_NUMBER 3032000
128 #define SQLITE_SOURCE_ID "2020-04-18 14:12:00 d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -1155,10 +1155,11 @@
1155 #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
1156 #define SQLITE_FCNTL_LOCK_TIMEOUT 34
1157 #define SQLITE_FCNTL_DATA_VERSION 35
1158 #define SQLITE_FCNTL_SIZE_LIMIT 36
1159 #define SQLITE_FCNTL_CKPT_DONE 37
 
1160
1161 /* deprecated names */
1162 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1163 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1164 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -7650,11 +7651,11 @@
7650 #define SQLITE_TESTCTRL_FAULT_INSTALL 9
7651 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
7652 #define SQLITE_TESTCTRL_PENDING_BYTE 11
7653 #define SQLITE_TESTCTRL_ASSERT 12
7654 #define SQLITE_TESTCTRL_ALWAYS 13
7655 #define SQLITE_TESTCTRL_RESERVE 14
7656 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
7657 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
7658 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
7659 #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
7660 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
7661
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.32.0"
127 #define SQLITE_VERSION_NUMBER 3032000
128 #define SQLITE_SOURCE_ID "2020-04-20 17:35:32 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0926b"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -1155,10 +1155,11 @@
1155 #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
1156 #define SQLITE_FCNTL_LOCK_TIMEOUT 34
1157 #define SQLITE_FCNTL_DATA_VERSION 35
1158 #define SQLITE_FCNTL_SIZE_LIMIT 36
1159 #define SQLITE_FCNTL_CKPT_DONE 37
1160 #define SQLITE_FCNTL_RESERVE_BYTES 38
1161
1162 /* deprecated names */
1163 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1164 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1165 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -7650,11 +7651,11 @@
7651 #define SQLITE_TESTCTRL_FAULT_INSTALL 9
7652 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
7653 #define SQLITE_TESTCTRL_PENDING_BYTE 11
7654 #define SQLITE_TESTCTRL_ASSERT 12
7655 #define SQLITE_TESTCTRL_ALWAYS 13
7656 #define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
7657 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
7658 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
7659 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
7660 #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
7661 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
7662

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button