Fossil SCM

Merge the latest trunk enhancements into the timestamp-vfs branch.

drh 2026-01-09 16:46 timestamp-vfs merge
Commit b718f73b47ebec0edd7c607bcf823c609b42780917916ab0873d5f80f048cf86
+16 -6
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21
-** 1091f3371f4af75344c2e6da26656c259fa9 with changes in files:
21
+** 9adab8b2bef4130abd358d53384cb5f4dd69 with changes in files:
2222
**
2323
**
2424
*/
2525
#ifndef SQLITE_AMALGAMATION
2626
#define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467467
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468468
** [sqlite_version()] and [sqlite_source_id()].
469469
*/
470470
#define SQLITE_VERSION "3.52.0"
471471
#define SQLITE_VERSION_NUMBER 3052000
472
-#define SQLITE_SOURCE_ID "2026-01-08 15:26:19 1091f3371f4af75344c2e6da26656c259fa96c8a8da9acde3db79df8aa95fd0a"
472
+#define SQLITE_SOURCE_ID "2026-01-09 00:41:35 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516"
473473
#define SQLITE_SCM_BRANCH "trunk"
474474
#define SQLITE_SCM_TAGS ""
475
-#define SQLITE_SCM_DATETIME "2026-01-08T15:26:19.338Z"
475
+#define SQLITE_SCM_DATETIME "2026-01-09T00:41:35.433Z"
476476
477477
/*
478478
** CAPI3REF: Run-Time Library Version Numbers
479479
** KEYWORDS: sqlite3_version sqlite3_sourceid
480480
**
@@ -160159,13 +160159,15 @@
160159160159
if( rc!=SQLITE_OK ) goto end_of_vacuum;
160160160160
assert( (db->nDb-1)==nDb );
160161160161
pDb = &db->aDb[nDb];
160162160162
assert( strcmp(pDb->zDbSName,zDbVacuum)==0 );
160163160163
pTemp = pDb->pBt;
160164
+ nRes = sqlite3BtreeGetRequestedReserve(pMain);
160164160165
if( pOut ){
160165160166
sqlite3_file *id = sqlite3PagerFile(sqlite3BtreePager(pTemp));
160166160167
i64 sz = 0;
160168
+ const char *zFilename;
160167160169
if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){
160168160170
rc = SQLITE_ERROR;
160169160171
sqlite3SetString(pzErrMsg, db, "output file already exists");
160170160172
goto end_of_vacuum;
160171160173
}
@@ -160173,12 +160175,20 @@
160173160175
160174160176
/* For a VACUUM INTO, the pager-flags are set to the same values as
160175160177
** they are for the database being vacuumed, except that PAGER_CACHESPILL
160176160178
** is always set. */
160177160179
pgflags = db->aDb[iDb].safety_level | (db->flags & PAGER_FLAGS_MASK);
160180
+
160181
+ /* If the VACUUM INTO target file is a URI filename and if the
160182
+ ** "reserve=N" query parameter is present, reset the reserve to the
160183
+ ** amount specified, if the amount is within range */
160184
+ zFilename = sqlite3BtreeGetFilename(pTemp);
160185
+ if( ALWAYS(zFilename) ){
160186
+ int nNew = (int)sqlite3_uri_int64(zFilename, "reserve", nRes);
160187
+ if( nNew>=0 && nNew<=255 ) nRes = nNew;
160188
+ }
160178160189
}
160179
- nRes = sqlite3BtreeGetRequestedReserve(pMain);
160180160190
160181160191
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
160182160192
sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
160183160193
sqlite3BtreeSetPagerFlags(pTemp, pgflags|PAGER_CACHESPILL);
160184160194
@@ -220293,11 +220303,11 @@
220293220303
tree.nBytesPerCell = 8 + 8 * tree.nDim;
220294220304
node.zData = (u8 *)sqlite3_value_blob(apArg[1]);
220295220305
if( node.zData==0 ) return;
220296220306
nData = sqlite3_value_bytes(apArg[1]);
220297220307
if( nData<4 ) return;
220298
- if( nData<NCELL(&node)*tree.nBytesPerCell ) return;
220308
+ if( nData<4+NCELL(&node)*tree.nBytesPerCell ) return;
220299220309
220300220310
pOut = sqlite3_str_new(0);
220301220311
for(ii=0; ii<NCELL(&node); ii++){
220302220312
RtreeCell cell;
220303220313
int jj;
@@ -261170,11 +261180,11 @@
261170261180
int nArg, /* Number of args */
261171261181
sqlite3_value **apUnused /* Function arguments */
261172261182
){
261173261183
assert( nArg==0 );
261174261184
UNUSED_PARAM2(nArg, apUnused);
261175
- sqlite3_result_text(pCtx, "fts5: 2026-01-08 12:22:50 762d3cbf06218f1010425a98a71ebf7623b84b45a90e6419b7dec7f10ad0c5a5", -1, SQLITE_TRANSIENT);
261185
+ sqlite3_result_text(pCtx, "fts5: 2026-01-09 00:41:35 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516", -1, SQLITE_TRANSIENT);
261176261186
}
261177261187
261178261188
/*
261179261189
** Implementation of fts5_locale(LOCALE, TEXT) function.
261180261190
**
261181261191
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** 1091f3371f4af75344c2e6da26656c259fa9 with changes in files:
22 **
23 **
24 */
25 #ifndef SQLITE_AMALGAMATION
26 #define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468 ** [sqlite_version()] and [sqlite_source_id()].
469 */
470 #define SQLITE_VERSION "3.52.0"
471 #define SQLITE_VERSION_NUMBER 3052000
472 #define SQLITE_SOURCE_ID "2026-01-08 15:26:19 1091f3371f4af75344c2e6da26656c259fa96c8a8da9acde3db79df8aa95fd0a"
473 #define SQLITE_SCM_BRANCH "trunk"
474 #define SQLITE_SCM_TAGS ""
475 #define SQLITE_SCM_DATETIME "2026-01-08T15:26:19.338Z"
476
477 /*
478 ** CAPI3REF: Run-Time Library Version Numbers
479 ** KEYWORDS: sqlite3_version sqlite3_sourceid
480 **
@@ -160159,13 +160159,15 @@
160159 if( rc!=SQLITE_OK ) goto end_of_vacuum;
160160 assert( (db->nDb-1)==nDb );
160161 pDb = &db->aDb[nDb];
160162 assert( strcmp(pDb->zDbSName,zDbVacuum)==0 );
160163 pTemp = pDb->pBt;
 
160164 if( pOut ){
160165 sqlite3_file *id = sqlite3PagerFile(sqlite3BtreePager(pTemp));
160166 i64 sz = 0;
 
160167 if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){
160168 rc = SQLITE_ERROR;
160169 sqlite3SetString(pzErrMsg, db, "output file already exists");
160170 goto end_of_vacuum;
160171 }
@@ -160173,12 +160175,20 @@
160173
160174 /* For a VACUUM INTO, the pager-flags are set to the same values as
160175 ** they are for the database being vacuumed, except that PAGER_CACHESPILL
160176 ** is always set. */
160177 pgflags = db->aDb[iDb].safety_level | (db->flags & PAGER_FLAGS_MASK);
 
 
 
 
 
 
 
 
 
160178 }
160179 nRes = sqlite3BtreeGetRequestedReserve(pMain);
160180
160181 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
160182 sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
160183 sqlite3BtreeSetPagerFlags(pTemp, pgflags|PAGER_CACHESPILL);
160184
@@ -220293,11 +220303,11 @@
220293 tree.nBytesPerCell = 8 + 8 * tree.nDim;
220294 node.zData = (u8 *)sqlite3_value_blob(apArg[1]);
220295 if( node.zData==0 ) return;
220296 nData = sqlite3_value_bytes(apArg[1]);
220297 if( nData<4 ) return;
220298 if( nData<NCELL(&node)*tree.nBytesPerCell ) return;
220299
220300 pOut = sqlite3_str_new(0);
220301 for(ii=0; ii<NCELL(&node); ii++){
220302 RtreeCell cell;
220303 int jj;
@@ -261170,11 +261180,11 @@
261170 int nArg, /* Number of args */
261171 sqlite3_value **apUnused /* Function arguments */
261172 ){
261173 assert( nArg==0 );
261174 UNUSED_PARAM2(nArg, apUnused);
261175 sqlite3_result_text(pCtx, "fts5: 2026-01-08 12:22:50 762d3cbf06218f1010425a98a71ebf7623b84b45a90e6419b7dec7f10ad0c5a5", -1, SQLITE_TRANSIENT);
261176 }
261177
261178 /*
261179 ** Implementation of fts5_locale(LOCALE, TEXT) function.
261180 **
261181
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** 9adab8b2bef4130abd358d53384cb5f4dd69 with changes in files:
22 **
23 **
24 */
25 #ifndef SQLITE_AMALGAMATION
26 #define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468 ** [sqlite_version()] and [sqlite_source_id()].
469 */
470 #define SQLITE_VERSION "3.52.0"
471 #define SQLITE_VERSION_NUMBER 3052000
472 #define SQLITE_SOURCE_ID "2026-01-09 00:41:35 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516"
473 #define SQLITE_SCM_BRANCH "trunk"
474 #define SQLITE_SCM_TAGS ""
475 #define SQLITE_SCM_DATETIME "2026-01-09T00:41:35.433Z"
476
477 /*
478 ** CAPI3REF: Run-Time Library Version Numbers
479 ** KEYWORDS: sqlite3_version sqlite3_sourceid
480 **
@@ -160159,13 +160159,15 @@
160159 if( rc!=SQLITE_OK ) goto end_of_vacuum;
160160 assert( (db->nDb-1)==nDb );
160161 pDb = &db->aDb[nDb];
160162 assert( strcmp(pDb->zDbSName,zDbVacuum)==0 );
160163 pTemp = pDb->pBt;
160164 nRes = sqlite3BtreeGetRequestedReserve(pMain);
160165 if( pOut ){
160166 sqlite3_file *id = sqlite3PagerFile(sqlite3BtreePager(pTemp));
160167 i64 sz = 0;
160168 const char *zFilename;
160169 if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){
160170 rc = SQLITE_ERROR;
160171 sqlite3SetString(pzErrMsg, db, "output file already exists");
160172 goto end_of_vacuum;
160173 }
@@ -160173,12 +160175,20 @@
160175
160176 /* For a VACUUM INTO, the pager-flags are set to the same values as
160177 ** they are for the database being vacuumed, except that PAGER_CACHESPILL
160178 ** is always set. */
160179 pgflags = db->aDb[iDb].safety_level | (db->flags & PAGER_FLAGS_MASK);
160180
160181 /* If the VACUUM INTO target file is a URI filename and if the
160182 ** "reserve=N" query parameter is present, reset the reserve to the
160183 ** amount specified, if the amount is within range */
160184 zFilename = sqlite3BtreeGetFilename(pTemp);
160185 if( ALWAYS(zFilename) ){
160186 int nNew = (int)sqlite3_uri_int64(zFilename, "reserve", nRes);
160187 if( nNew>=0 && nNew<=255 ) nRes = nNew;
160188 }
160189 }
 
160190
160191 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
160192 sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
160193 sqlite3BtreeSetPagerFlags(pTemp, pgflags|PAGER_CACHESPILL);
160194
@@ -220293,11 +220303,11 @@
220303 tree.nBytesPerCell = 8 + 8 * tree.nDim;
220304 node.zData = (u8 *)sqlite3_value_blob(apArg[1]);
220305 if( node.zData==0 ) return;
220306 nData = sqlite3_value_bytes(apArg[1]);
220307 if( nData<4 ) return;
220308 if( nData<4+NCELL(&node)*tree.nBytesPerCell ) return;
220309
220310 pOut = sqlite3_str_new(0);
220311 for(ii=0; ii<NCELL(&node); ii++){
220312 RtreeCell cell;
220313 int jj;
@@ -261170,11 +261180,11 @@
261180 int nArg, /* Number of args */
261181 sqlite3_value **apUnused /* Function arguments */
261182 ){
261183 assert( nArg==0 );
261184 UNUSED_PARAM2(nArg, apUnused);
261185 sqlite3_result_text(pCtx, "fts5: 2026-01-09 00:41:35 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516", -1, SQLITE_TRANSIENT);
261186 }
261187
261188 /*
261189 ** Implementation of fts5_locale(LOCALE, TEXT) function.
261190 **
261191
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.52.0"
150150
#define SQLITE_VERSION_NUMBER 3052000
151
-#define SQLITE_SOURCE_ID "2026-01-08 15:26:19 1091f3371f4af75344c2e6da26656c259fa96c8a8da9acde3db79df8aa95fd0a"
151
+#define SQLITE_SOURCE_ID "2026-01-09 00:41:35 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516"
152152
#define SQLITE_SCM_BRANCH "trunk"
153153
#define SQLITE_SCM_TAGS ""
154
-#define SQLITE_SCM_DATETIME "2026-01-08T15:26:19.338Z"
154
+#define SQLITE_SCM_DATETIME "2026-01-09T00:41:35.433Z"
155155
156156
/*
157157
** CAPI3REF: Run-Time Library Version Numbers
158158
** KEYWORDS: sqlite3_version sqlite3_sourceid
159159
**
160160
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.52.0"
150 #define SQLITE_VERSION_NUMBER 3052000
151 #define SQLITE_SOURCE_ID "2026-01-08 15:26:19 1091f3371f4af75344c2e6da26656c259fa96c8a8da9acde3db79df8aa95fd0a"
152 #define SQLITE_SCM_BRANCH "trunk"
153 #define SQLITE_SCM_TAGS ""
154 #define SQLITE_SCM_DATETIME "2026-01-08T15:26:19.338Z"
155
156 /*
157 ** CAPI3REF: Run-Time Library Version Numbers
158 ** KEYWORDS: sqlite3_version sqlite3_sourceid
159 **
160
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.52.0"
150 #define SQLITE_VERSION_NUMBER 3052000
151 #define SQLITE_SOURCE_ID "2026-01-09 00:41:35 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516"
152 #define SQLITE_SCM_BRANCH "trunk"
153 #define SQLITE_SCM_TAGS ""
154 #define SQLITE_SCM_DATETIME "2026-01-09T00:41:35.433Z"
155
156 /*
157 ** CAPI3REF: Run-Time Library Version Numbers
158 ** KEYWORDS: sqlite3_version sqlite3_sourceid
159 **
160
+2 -6
--- src/http.c
+++ src/http.c
@@ -751,15 +751,16 @@
751751
if( mHttpFlags & HTTP_QUIET ) goto write_err;
752752
fossil_warning("response truncated: got %d bytes of %d",
753753
iRecvLen, iLength);
754754
goto write_err;
755755
}
756
- }else if( closeConnection ){
756
+ }else{
757757
/* Read content until end-of-file */
758758
int iRecvLen; /* Received length of the reply payload */
759759
unsigned int nReq = 1000;
760760
unsigned int nPrior = 0;
761
+ closeConnection = 1;
761762
do{
762763
nReq *= 2;
763764
blob_resize(pReply, nPrior+nReq);
764765
iRecvLen = transport_receive(&g.url, &pReply->aData[nPrior], (int)nReq);
765766
nPrior += iRecvLen;
@@ -766,15 +767,10 @@
766767
pReply->nUsed = nPrior;
767768
}while( iRecvLen==nReq && nReq<0x20000000 );
768769
if( mHttpFlags & HTTP_VERBOSE ){
769770
fossil_print("Reply received: %u bytes (w/o content-length)\n", nPrior);
770771
}
771
- }else{
772
- assert( iLength<0 && !closeConnection );
773
- if( mHttpFlags & HTTP_QUIET ) goto write_err;
774
- fossil_warning("\"content-length\" missing from %d keep-alive reply", rc);
775
- goto write_err;
776772
}
777773
if( isError ){
778774
char *z;
779775
int i, j;
780776
z = blob_str(pReply);
781777
--- src/http.c
+++ src/http.c
@@ -751,15 +751,16 @@
751 if( mHttpFlags & HTTP_QUIET ) goto write_err;
752 fossil_warning("response truncated: got %d bytes of %d",
753 iRecvLen, iLength);
754 goto write_err;
755 }
756 }else if( closeConnection ){
757 /* Read content until end-of-file */
758 int iRecvLen; /* Received length of the reply payload */
759 unsigned int nReq = 1000;
760 unsigned int nPrior = 0;
 
761 do{
762 nReq *= 2;
763 blob_resize(pReply, nPrior+nReq);
764 iRecvLen = transport_receive(&g.url, &pReply->aData[nPrior], (int)nReq);
765 nPrior += iRecvLen;
@@ -766,15 +767,10 @@
766 pReply->nUsed = nPrior;
767 }while( iRecvLen==nReq && nReq<0x20000000 );
768 if( mHttpFlags & HTTP_VERBOSE ){
769 fossil_print("Reply received: %u bytes (w/o content-length)\n", nPrior);
770 }
771 }else{
772 assert( iLength<0 && !closeConnection );
773 if( mHttpFlags & HTTP_QUIET ) goto write_err;
774 fossil_warning("\"content-length\" missing from %d keep-alive reply", rc);
775 goto write_err;
776 }
777 if( isError ){
778 char *z;
779 int i, j;
780 z = blob_str(pReply);
781
--- src/http.c
+++ src/http.c
@@ -751,15 +751,16 @@
751 if( mHttpFlags & HTTP_QUIET ) goto write_err;
752 fossil_warning("response truncated: got %d bytes of %d",
753 iRecvLen, iLength);
754 goto write_err;
755 }
756 }else{
757 /* Read content until end-of-file */
758 int iRecvLen; /* Received length of the reply payload */
759 unsigned int nReq = 1000;
760 unsigned int nPrior = 0;
761 closeConnection = 1;
762 do{
763 nReq *= 2;
764 blob_resize(pReply, nPrior+nReq);
765 iRecvLen = transport_receive(&g.url, &pReply->aData[nPrior], (int)nReq);
766 nPrior += iRecvLen;
@@ -766,15 +767,10 @@
767 pReply->nUsed = nPrior;
768 }while( iRecvLen==nReq && nReq<0x20000000 );
769 if( mHttpFlags & HTTP_VERBOSE ){
770 fossil_print("Reply received: %u bytes (w/o content-length)\n", nPrior);
771 }
 
 
 
 
 
772 }
773 if( isError ){
774 char *z;
775 int i, j;
776 z = blob_str(pReply);
777

Keyboard Shortcuts

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