Fossil SCM

Update to the latest SQLite 3.35 prerelease in order to fix harmless #ifdef errors and compiler warnings.

drh 2020-12-16 14:28 trunk
Commit c9b6be2f62e02ac65f27c1b51c7c957ce2d3b2bdab05c6384eb96d0144cc7f24
2 files changed +10 -11 +2 -2
+10 -11
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1186,11 +1186,11 @@
11861186
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11871187
** [sqlite_version()] and [sqlite_source_id()].
11881188
*/
11891189
#define SQLITE_VERSION "3.35.0"
11901190
#define SQLITE_VERSION_NUMBER 3035000
1191
-#define SQLITE_SOURCE_ID "2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030f2b36"
1191
+#define SQLITE_SOURCE_ID "2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660"
11921192
11931193
/*
11941194
** CAPI3REF: Run-Time Library Version Numbers
11951195
** KEYWORDS: sqlite3_version sqlite3_sourceid
11961196
**
@@ -4758,11 +4758,11 @@
47584758
** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
47594759
**
47604760
** If the Y parameter to sqlite3_free_filename(Y) is anything other
47614761
** than a NULL pointer or a pointer previously acquired from
47624762
** sqlite3_create_filename(), then bad things such as heap
4763
-** corruption or segfaults may occur. The value Y should be
4763
+** corruption or segfaults may occur. The value Y should not be
47644764
** used again after sqlite3_free_filename(Y) has been called. This means
47654765
** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
47664766
** then the corresponding [sqlite3_module.xClose() method should also be
47674767
** invoked prior to calling sqlite3_free_filename(Y).
47684768
*/
@@ -14626,15 +14626,13 @@
1462614626
#endif
1462714627
1462814628
/*
1462914629
** Macros for "wheretrace"
1463014630
*/
14631
-#if !defined(SQLITE_AMAGAMATION)
14632
-SQLITE_PRIVATE u32 sqlite3WhereTrace;
14633
-#endif
1463414631
#if defined(SQLITE_DEBUG) \
1463514632
&& (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_WHERETRACE))
14633
+SQLITE_PRIVATE u32 sqlite3WhereTrace;
1463614634
# define WHERETRACE(K,X) if(sqlite3WhereTrace&(K)) sqlite3DebugPrintf X
1463714635
# define WHERETRACE_ENABLED 1
1463814636
#else
1463914637
# define WHERETRACE(K,X)
1464014638
#endif
@@ -73748,12 +73746,12 @@
7374873746
SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
7374973747
int rc = SQLITE_OK;
7375073748
BtShared *pBt = pDest->pBt;
7375173749
u8 *aOut = pBt->pTmpSpace; /* Pointer to next output buffer */
7375273750
const u8 *aIn; /* Pointer to next input buffer */
73753
- int nIn; /* Size of input buffer aIn[] */
73754
- int nRem; /* Bytes of data still to copy */
73751
+ u32 nIn; /* Size of input buffer aIn[] */
73752
+ u32 nRem; /* Bytes of data still to copy */
7375573753
7375673754
getCellInfo(pSrc);
7375773755
aOut += putVarint32(aOut, pSrc->info.nPayload);
7375873756
if( pDest->pKeyInfo==0 ) aOut += putVarint(aOut, iKey);
7375973757
nIn = pSrc->info.nLocal;
@@ -73766,11 +73764,11 @@
7376673764
Pager *pSrcPager = pSrc->pBt->pPager;
7376773765
u8 *pPgnoOut = 0;
7376873766
Pgno ovflIn = 0;
7376973767
DbPage *pPageIn = 0;
7377073768
MemPage *pPageOut = 0;
73771
- int nOut; /* Size of output buffer aOut[] */
73769
+ u32 nOut; /* Size of output buffer aOut[] */
7377273770
7377373771
nOut = btreePayloadToLocal(pDest->pPage, pSrc->info.nPayload);
7377473772
pBt->nPreformatSize = nOut + (aOut - pBt->pTmpSpace);
7377573773
if( nOut<pSrc->info.nPayload ){
7377673774
pPgnoOut = &aOut[nOut];
@@ -119849,10 +119847,11 @@
119849119847
int argc,
119850119848
sqlite3_value **argv
119851119849
){
119852119850
int type0;
119853119851
double x;
119852
+ UNUSED_PARAMETER(argc);
119854119853
assert( argc==1 );
119855119854
type0 = sqlite3_value_numeric_type(argv[0]);
119856119855
if( type0!=SQLITE_INTEGER && type0!=SQLITE_FLOAT ) return;
119857119856
x = sqlite3_value_double(argv[0]);
119858119857
sqlite3_result_int(context, x<0.0 ? -1 : x>0.0 ? +1 : 0);
@@ -227552,11 +227551,11 @@
227552227551
int nArg, /* Number of args */
227553227552
sqlite3_value **apUnused /* Function arguments */
227554227553
){
227555227554
assert( nArg==0 );
227556227555
UNUSED_PARAM2(nArg, apUnused);
227557
- sqlite3_result_text(pCtx, "fts5: 2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030f2b36", -1, SQLITE_TRANSIENT);
227556
+ sqlite3_result_text(pCtx, "fts5: 2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660", -1, SQLITE_TRANSIENT);
227558227557
}
227559227558
227560227559
/*
227561227560
** Return true if zName is the extension on one of the shadow tables used
227562227561
** by this module.
@@ -232478,12 +232477,12 @@
232478232477
}
232479232478
#endif /* SQLITE_CORE */
232480232479
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
232481232480
232482232481
/************** End of stmt.c ************************************************/
232483
-#if __LINE__!=232483
232482
+#if __LINE__!=232482
232484232483
#undef SQLITE_SOURCE_ID
232485
-#define SQLITE_SOURCE_ID "2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030falt2"
232484
+#define SQLITE_SOURCE_ID "2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66alt2"
232486232485
#endif
232487232486
/* Return the source-id for this library */
232488232487
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
232489232488
/************************** End of sqlite3.c ******************************/
232490232489
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1186,11 +1186,11 @@
1186 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1187 ** [sqlite_version()] and [sqlite_source_id()].
1188 */
1189 #define SQLITE_VERSION "3.35.0"
1190 #define SQLITE_VERSION_NUMBER 3035000
1191 #define SQLITE_SOURCE_ID "2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030f2b36"
1192
1193 /*
1194 ** CAPI3REF: Run-Time Library Version Numbers
1195 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1196 **
@@ -4758,11 +4758,11 @@
4758 ** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
4759 **
4760 ** If the Y parameter to sqlite3_free_filename(Y) is anything other
4761 ** than a NULL pointer or a pointer previously acquired from
4762 ** sqlite3_create_filename(), then bad things such as heap
4763 ** corruption or segfaults may occur. The value Y should be
4764 ** used again after sqlite3_free_filename(Y) has been called. This means
4765 ** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
4766 ** then the corresponding [sqlite3_module.xClose() method should also be
4767 ** invoked prior to calling sqlite3_free_filename(Y).
4768 */
@@ -14626,15 +14626,13 @@
14626 #endif
14627
14628 /*
14629 ** Macros for "wheretrace"
14630 */
14631 #if !defined(SQLITE_AMAGAMATION)
14632 SQLITE_PRIVATE u32 sqlite3WhereTrace;
14633 #endif
14634 #if defined(SQLITE_DEBUG) \
14635 && (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_WHERETRACE))
 
14636 # define WHERETRACE(K,X) if(sqlite3WhereTrace&(K)) sqlite3DebugPrintf X
14637 # define WHERETRACE_ENABLED 1
14638 #else
14639 # define WHERETRACE(K,X)
14640 #endif
@@ -73748,12 +73746,12 @@
73748 SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
73749 int rc = SQLITE_OK;
73750 BtShared *pBt = pDest->pBt;
73751 u8 *aOut = pBt->pTmpSpace; /* Pointer to next output buffer */
73752 const u8 *aIn; /* Pointer to next input buffer */
73753 int nIn; /* Size of input buffer aIn[] */
73754 int nRem; /* Bytes of data still to copy */
73755
73756 getCellInfo(pSrc);
73757 aOut += putVarint32(aOut, pSrc->info.nPayload);
73758 if( pDest->pKeyInfo==0 ) aOut += putVarint(aOut, iKey);
73759 nIn = pSrc->info.nLocal;
@@ -73766,11 +73764,11 @@
73766 Pager *pSrcPager = pSrc->pBt->pPager;
73767 u8 *pPgnoOut = 0;
73768 Pgno ovflIn = 0;
73769 DbPage *pPageIn = 0;
73770 MemPage *pPageOut = 0;
73771 int nOut; /* Size of output buffer aOut[] */
73772
73773 nOut = btreePayloadToLocal(pDest->pPage, pSrc->info.nPayload);
73774 pBt->nPreformatSize = nOut + (aOut - pBt->pTmpSpace);
73775 if( nOut<pSrc->info.nPayload ){
73776 pPgnoOut = &aOut[nOut];
@@ -119849,10 +119847,11 @@
119849 int argc,
119850 sqlite3_value **argv
119851 ){
119852 int type0;
119853 double x;
 
119854 assert( argc==1 );
119855 type0 = sqlite3_value_numeric_type(argv[0]);
119856 if( type0!=SQLITE_INTEGER && type0!=SQLITE_FLOAT ) return;
119857 x = sqlite3_value_double(argv[0]);
119858 sqlite3_result_int(context, x<0.0 ? -1 : x>0.0 ? +1 : 0);
@@ -227552,11 +227551,11 @@
227552 int nArg, /* Number of args */
227553 sqlite3_value **apUnused /* Function arguments */
227554 ){
227555 assert( nArg==0 );
227556 UNUSED_PARAM2(nArg, apUnused);
227557 sqlite3_result_text(pCtx, "fts5: 2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030f2b36", -1, SQLITE_TRANSIENT);
227558 }
227559
227560 /*
227561 ** Return true if zName is the extension on one of the shadow tables used
227562 ** by this module.
@@ -232478,12 +232477,12 @@
232478 }
232479 #endif /* SQLITE_CORE */
232480 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
232481
232482 /************** End of stmt.c ************************************************/
232483 #if __LINE__!=232483
232484 #undef SQLITE_SOURCE_ID
232485 #define SQLITE_SOURCE_ID "2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030falt2"
232486 #endif
232487 /* Return the source-id for this library */
232488 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
232489 /************************** End of sqlite3.c ******************************/
232490
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1186,11 +1186,11 @@
1186 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1187 ** [sqlite_version()] and [sqlite_source_id()].
1188 */
1189 #define SQLITE_VERSION "3.35.0"
1190 #define SQLITE_VERSION_NUMBER 3035000
1191 #define SQLITE_SOURCE_ID "2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660"
1192
1193 /*
1194 ** CAPI3REF: Run-Time Library Version Numbers
1195 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1196 **
@@ -4758,11 +4758,11 @@
4758 ** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
4759 **
4760 ** If the Y parameter to sqlite3_free_filename(Y) is anything other
4761 ** than a NULL pointer or a pointer previously acquired from
4762 ** sqlite3_create_filename(), then bad things such as heap
4763 ** corruption or segfaults may occur. The value Y should not be
4764 ** used again after sqlite3_free_filename(Y) has been called. This means
4765 ** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
4766 ** then the corresponding [sqlite3_module.xClose() method should also be
4767 ** invoked prior to calling sqlite3_free_filename(Y).
4768 */
@@ -14626,15 +14626,13 @@
14626 #endif
14627
14628 /*
14629 ** Macros for "wheretrace"
14630 */
 
 
 
14631 #if defined(SQLITE_DEBUG) \
14632 && (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_WHERETRACE))
14633 SQLITE_PRIVATE u32 sqlite3WhereTrace;
14634 # define WHERETRACE(K,X) if(sqlite3WhereTrace&(K)) sqlite3DebugPrintf X
14635 # define WHERETRACE_ENABLED 1
14636 #else
14637 # define WHERETRACE(K,X)
14638 #endif
@@ -73748,12 +73746,12 @@
73746 SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
73747 int rc = SQLITE_OK;
73748 BtShared *pBt = pDest->pBt;
73749 u8 *aOut = pBt->pTmpSpace; /* Pointer to next output buffer */
73750 const u8 *aIn; /* Pointer to next input buffer */
73751 u32 nIn; /* Size of input buffer aIn[] */
73752 u32 nRem; /* Bytes of data still to copy */
73753
73754 getCellInfo(pSrc);
73755 aOut += putVarint32(aOut, pSrc->info.nPayload);
73756 if( pDest->pKeyInfo==0 ) aOut += putVarint(aOut, iKey);
73757 nIn = pSrc->info.nLocal;
@@ -73766,11 +73764,11 @@
73764 Pager *pSrcPager = pSrc->pBt->pPager;
73765 u8 *pPgnoOut = 0;
73766 Pgno ovflIn = 0;
73767 DbPage *pPageIn = 0;
73768 MemPage *pPageOut = 0;
73769 u32 nOut; /* Size of output buffer aOut[] */
73770
73771 nOut = btreePayloadToLocal(pDest->pPage, pSrc->info.nPayload);
73772 pBt->nPreformatSize = nOut + (aOut - pBt->pTmpSpace);
73773 if( nOut<pSrc->info.nPayload ){
73774 pPgnoOut = &aOut[nOut];
@@ -119849,10 +119847,11 @@
119847 int argc,
119848 sqlite3_value **argv
119849 ){
119850 int type0;
119851 double x;
119852 UNUSED_PARAMETER(argc);
119853 assert( argc==1 );
119854 type0 = sqlite3_value_numeric_type(argv[0]);
119855 if( type0!=SQLITE_INTEGER && type0!=SQLITE_FLOAT ) return;
119856 x = sqlite3_value_double(argv[0]);
119857 sqlite3_result_int(context, x<0.0 ? -1 : x>0.0 ? +1 : 0);
@@ -227552,11 +227551,11 @@
227551 int nArg, /* Number of args */
227552 sqlite3_value **apUnused /* Function arguments */
227553 ){
227554 assert( nArg==0 );
227555 UNUSED_PARAM2(nArg, apUnused);
227556 sqlite3_result_text(pCtx, "fts5: 2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660", -1, SQLITE_TRANSIENT);
227557 }
227558
227559 /*
227560 ** Return true if zName is the extension on one of the shadow tables used
227561 ** by this module.
@@ -232478,12 +232477,12 @@
232477 }
232478 #endif /* SQLITE_CORE */
232479 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
232480
232481 /************** End of stmt.c ************************************************/
232482 #if __LINE__!=232482
232483 #undef SQLITE_SOURCE_ID
232484 #define SQLITE_SOURCE_ID "2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66alt2"
232485 #endif
232486 /* Return the source-id for this library */
232487 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
232488 /************************** End of sqlite3.c ******************************/
232489
+2 -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.35.0"
127127
#define SQLITE_VERSION_NUMBER 3035000
128
-#define SQLITE_SOURCE_ID "2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030f2b36"
128
+#define SQLITE_SOURCE_ID "2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
@@ -3695,11 +3695,11 @@
36953695
** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
36963696
**
36973697
** If the Y parameter to sqlite3_free_filename(Y) is anything other
36983698
** than a NULL pointer or a pointer previously acquired from
36993699
** sqlite3_create_filename(), then bad things such as heap
3700
-** corruption or segfaults may occur. The value Y should be
3700
+** corruption or segfaults may occur. The value Y should not be
37013701
** used again after sqlite3_free_filename(Y) has been called. This means
37023702
** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
37033703
** then the corresponding [sqlite3_module.xClose() method should also be
37043704
** invoked prior to calling sqlite3_free_filename(Y).
37053705
*/
37063706
--- 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.35.0"
127 #define SQLITE_VERSION_NUMBER 3035000
128 #define SQLITE_SOURCE_ID "2020-12-15 13:55:38 ea0a7f103a6f6a9e57d7377140ff9f372bf2b156f86f148291fb05a7030f2b36"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -3695,11 +3695,11 @@
3695 ** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
3696 **
3697 ** If the Y parameter to sqlite3_free_filename(Y) is anything other
3698 ** than a NULL pointer or a pointer previously acquired from
3699 ** sqlite3_create_filename(), then bad things such as heap
3700 ** corruption or segfaults may occur. The value Y should be
3701 ** used again after sqlite3_free_filename(Y) has been called. This means
3702 ** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
3703 ** then the corresponding [sqlite3_module.xClose() method should also be
3704 ** invoked prior to calling sqlite3_free_filename(Y).
3705 */
3706
--- 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.35.0"
127 #define SQLITE_VERSION_NUMBER 3035000
128 #define SQLITE_SOURCE_ID "2020-12-16 14:20:45 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -3695,11 +3695,11 @@
3695 ** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
3696 **
3697 ** If the Y parameter to sqlite3_free_filename(Y) is anything other
3698 ** than a NULL pointer or a pointer previously acquired from
3699 ** sqlite3_create_filename(), then bad things such as heap
3700 ** corruption or segfaults may occur. The value Y should not be
3701 ** used again after sqlite3_free_filename(Y) has been called. This means
3702 ** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
3703 ** then the corresponding [sqlite3_module.xClose() method should also be
3704 ** invoked prior to calling sqlite3_free_filename(Y).
3705 */
3706

Keyboard Shortcuts

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