Fossil SCM

Update the built-in SQLite to the official 3.27.0 release version.

drh 2019-02-07 17:18 trunk
Commit c56fce69f191dc6624ac701559a58d3ef1cb1a2baabd6c7416d0ace3ee03a701
2 files changed +20 -22 +1 -1
+20 -22
--- 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.27.0"
11661166
#define SQLITE_VERSION_NUMBER 3027000
1167
-#define SQLITE_SOURCE_ID "2019-02-05 20:51:41 4d0a949fd92e19fbf243a2e3a1a7c2cdb111f9a6943949d2420dd846bc7d9285"
1167
+#define SQLITE_SOURCE_ID "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713"
11681168
11691169
/*
11701170
** CAPI3REF: Run-Time Library Version Numbers
11711171
** KEYWORDS: sqlite3_version sqlite3_sourceid
11721172
**
@@ -48619,16 +48619,26 @@
4861948619
/*
4862048620
** Each cache entry is represented by an instance of the following
4862148621
** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of
4862248622
** PgHdr1.pCache->szPage bytes is allocated directly before this structure
4862348623
** in memory.
48624
+**
48625
+** Note: Variables isBulkLocal and isAnchor were once type "u8". That works,
48626
+** but causes a 2-byte gap in the structure for most architectures (since
48627
+** pointers must be either 4 or 8-byte aligned). As this structure is located
48628
+** in memory directly after the associated page data, if the database is
48629
+** corrupt, code at the b-tree layer may overread the page buffer and
48630
+** read part of this structure before the corruption is detected. This
48631
+** can cause a valgrind error if the unitialized gap is accessed. Using u16
48632
+** ensures there is no such gap, and therefore no bytes of unitialized memory
48633
+** in the structure.
4862448634
*/
4862548635
struct PgHdr1 {
4862648636
sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */
4862748637
unsigned int iKey; /* Key value (page number) */
48628
- u8 isBulkLocal; /* This page from bulk local storage */
48629
- u8 isAnchor; /* This is the PGroup.lru element */
48638
+ u16 isBulkLocal; /* This page from bulk local storage */
48639
+ u16 isAnchor; /* This is the PGroup.lru element */
4863048640
PgHdr1 *pNext; /* Next in hash table chain */
4863148641
PCache1 *pCache; /* Cache that currently owns this page */
4863248642
PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
4863348643
PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
4863448644
/* NB: pLruPrev is only valid if pLruNext!=0 */
@@ -48830,10 +48840,11 @@
4883048840
pX->page.pBuf = zBulk;
4883148841
pX->page.pExtra = &pX[1];
4883248842
pX->isBulkLocal = 1;
4883348843
pX->isAnchor = 0;
4883448844
pX->pNext = pCache->pFree;
48845
+ pX->pLruPrev = 0; /* Initializing this saves a valgrind error */
4883548846
pCache->pFree = pX;
4883648847
zBulk += pCache->szAlloc;
4883748848
}while( --nBulk );
4883848849
}
4883948850
return pCache->pFree!=0;
@@ -110459,11 +110470,10 @@
110459110470
110460110471
/* Allocate additional space if needed */
110461110472
if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
110462110473
SrcList *pNew;
110463110474
int nAlloc = pSrc->nSrc*2+nExtra;
110464
- int nGot;
110465110475
sqlite3 *db = pParse->db;
110466110476
110467110477
if( pSrc->nSrc+nExtra>=SQLITE_MAX_SRCLIST ){
110468110478
sqlite3ErrorMsg(pParse, "too many FROM clause terms, max: %d",
110469110479
SQLITE_MAX_SRCLIST);
@@ -110475,12 +110485,11 @@
110475110485
if( pNew==0 ){
110476110486
assert( db->mallocFailed );
110477110487
return 0;
110478110488
}
110479110489
pSrc = pNew;
110480
- nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;
110481
- pSrc->nAlloc = nGot;
110490
+ pSrc->nAlloc = nAlloc;
110482110491
}
110483110492
110484110493
/* Move existing slots that come after the newly inserted slots
110485110494
** out of the way */
110486110495
for(i=pSrc->nSrc-1; i>=iStart; i--){
@@ -120462,17 +120471,15 @@
120462120471
/* ePragFlg: */ PragFlg_Result0,
120463120472
/* ColNames: */ 0, 0,
120464120473
/* iArg: */ 0 },
120465120474
#endif
120466120475
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120467
-#if !defined(SQLITE_OMIT_DEPRECATED)
120468120476
{/* zName: */ "count_changes",
120469120477
/* ePragTyp: */ PragTyp_FLAG,
120470120478
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120471120479
/* ColNames: */ 0, 0,
120472120480
/* iArg: */ SQLITE_CountRows },
120473
-#endif
120474120481
#endif
120475120482
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_OS_WIN
120476120483
{/* zName: */ "data_store_directory",
120477120484
/* ePragTyp: */ PragTyp_DATA_STORE_DIRECTORY,
120478120485
/* ePragFlg: */ PragFlg_NoColumns1,
@@ -120491,18 +120498,16 @@
120491120498
/* ePragTyp: */ PragTyp_DATABASE_LIST,
120492120499
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0,
120493120500
/* ColNames: */ 35, 3,
120494120501
/* iArg: */ 0 },
120495120502
#endif
120496
-#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
120497
-#if !defined(SQLITE_OMIT_DEPRECATED)
120503
+#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
120498120504
{/* zName: */ "default_cache_size",
120499120505
/* ePragTyp: */ PragTyp_DEFAULT_CACHE_SIZE,
120500120506
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
120501120507
/* ColNames: */ 45, 1,
120502120508
/* iArg: */ 0 },
120503
-#endif
120504120509
#endif
120505120510
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120506120511
#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
120507120512
{/* zName: */ "defer_foreign_keys",
120508120513
/* ePragTyp: */ PragTyp_FLAG,
@@ -120510,17 +120515,15 @@
120510120515
/* ColNames: */ 0, 0,
120511120516
/* iArg: */ SQLITE_DeferFKs },
120512120517
#endif
120513120518
#endif
120514120519
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120515
-#if !defined(SQLITE_OMIT_DEPRECATED)
120516120520
{/* zName: */ "empty_result_callbacks",
120517120521
/* ePragTyp: */ PragTyp_FLAG,
120518120522
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120519120523
/* ColNames: */ 0, 0,
120520120524
/* iArg: */ SQLITE_NullCallback },
120521
-#endif
120522120525
#endif
120523120526
#if !defined(SQLITE_OMIT_UTF16)
120524120527
{/* zName: */ "encoding",
120525120528
/* ePragTyp: */ PragTyp_ENCODING,
120526120529
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
@@ -120556,19 +120559,15 @@
120556120559
/* ePragFlg: */ PragFlg_ReadOnly|PragFlg_Result0,
120557120560
/* ColNames: */ 0, 0,
120558120561
/* iArg: */ BTREE_FREE_PAGE_COUNT },
120559120562
#endif
120560120563
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120561
-#if !defined(SQLITE_OMIT_DEPRECATED)
120562120564
{/* zName: */ "full_column_names",
120563120565
/* ePragTyp: */ PragTyp_FLAG,
120564120566
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120565120567
/* ColNames: */ 0, 0,
120566120568
/* iArg: */ SQLITE_FullColNames },
120567
-#endif
120568
-#endif
120569
-#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120570120569
{/* zName: */ "fullfsync",
120571120570
/* ePragTyp: */ PragTyp_FLAG,
120572120571
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120573120572
/* ColNames: */ 0, 0,
120574120573
/* iArg: */ SQLITE_FullFSync },
@@ -120793,17 +120792,15 @@
120793120792
/* ePragFlg: */ PragFlg_Result0,
120794120793
/* ColNames: */ 0, 0,
120795120794
/* iArg: */ 0 },
120796120795
#endif
120797120796
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120798
-#if !defined(SQLITE_OMIT_DEPRECATED)
120799120797
{/* zName: */ "short_column_names",
120800120798
/* ePragTyp: */ PragTyp_FLAG,
120801120799
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120802120800
/* ColNames: */ 0, 0,
120803120801
/* iArg: */ SQLITE_ShortColNames },
120804
-#endif
120805120802
#endif
120806120803
{/* zName: */ "shrink_memory",
120807120804
/* ePragTyp: */ PragTyp_SHRINK_MEMORY,
120808120805
/* ePragFlg: */ PragFlg_NoColumns,
120809120806
/* ColNames: */ 0, 0,
@@ -130079,10 +130076,11 @@
130079130076
){
130080130077
continue;
130081130078
}
130082130079
130083130080
if( flattenSubquery(pParse, p, i, isAgg) ){
130081
+ if( pParse->nErr ) goto select_end;
130084130082
/* This subquery can be absorbed into its parent. */
130085130083
i = -1;
130086130084
}
130087130085
pTabList = p->pSrc;
130088130086
if( db->mallocFailed ) goto select_end;
@@ -217071,11 +217069,11 @@
217071217069
int nArg, /* Number of args */
217072217070
sqlite3_value **apUnused /* Function arguments */
217073217071
){
217074217072
assert( nArg==0 );
217075217073
UNUSED_PARAM2(nArg, apUnused);
217076
- sqlite3_result_text(pCtx, "fts5: 2019-02-05 19:52:39 2f468da4e9fb3edb5e902fa5d3c528726d1fb64d749d29e558ba3243c76bcb95", -1, SQLITE_TRANSIENT);
217074
+ sqlite3_result_text(pCtx, "fts5: 2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713", -1, SQLITE_TRANSIENT);
217077217075
}
217078217076
217079217077
/*
217080217078
** Return true if zName is the extension on one of the shadow tables used
217081217079
** by this module.
@@ -221835,12 +221833,12 @@
221835221833
}
221836221834
#endif /* SQLITE_CORE */
221837221835
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
221838221836
221839221837
/************** End of stmt.c ************************************************/
221840
-#if __LINE__!=221840
221838
+#if __LINE__!=221838
221841221839
#undef SQLITE_SOURCE_ID
221842
-#define SQLITE_SOURCE_ID "2019-02-05 20:51:41 4d0a949fd92e19fbf243a2e3a1a7c2cdb111f9a6943949d2420dd846bc7dalt2"
221840
+#define SQLITE_SOURCE_ID "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac6alt2"
221843221841
#endif
221844221842
/* Return the source-id for this library */
221845221843
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
221846221844
/************************** End of sqlite3.c ******************************/
221847221845
--- 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.27.0"
1166 #define SQLITE_VERSION_NUMBER 3027000
1167 #define SQLITE_SOURCE_ID "2019-02-05 20:51:41 4d0a949fd92e19fbf243a2e3a1a7c2cdb111f9a6943949d2420dd846bc7d9285"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -48619,16 +48619,26 @@
48619 /*
48620 ** Each cache entry is represented by an instance of the following
48621 ** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of
48622 ** PgHdr1.pCache->szPage bytes is allocated directly before this structure
48623 ** in memory.
 
 
 
 
 
 
 
 
 
 
48624 */
48625 struct PgHdr1 {
48626 sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */
48627 unsigned int iKey; /* Key value (page number) */
48628 u8 isBulkLocal; /* This page from bulk local storage */
48629 u8 isAnchor; /* This is the PGroup.lru element */
48630 PgHdr1 *pNext; /* Next in hash table chain */
48631 PCache1 *pCache; /* Cache that currently owns this page */
48632 PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
48633 PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
48634 /* NB: pLruPrev is only valid if pLruNext!=0 */
@@ -48830,10 +48840,11 @@
48830 pX->page.pBuf = zBulk;
48831 pX->page.pExtra = &pX[1];
48832 pX->isBulkLocal = 1;
48833 pX->isAnchor = 0;
48834 pX->pNext = pCache->pFree;
 
48835 pCache->pFree = pX;
48836 zBulk += pCache->szAlloc;
48837 }while( --nBulk );
48838 }
48839 return pCache->pFree!=0;
@@ -110459,11 +110470,10 @@
110459
110460 /* Allocate additional space if needed */
110461 if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
110462 SrcList *pNew;
110463 int nAlloc = pSrc->nSrc*2+nExtra;
110464 int nGot;
110465 sqlite3 *db = pParse->db;
110466
110467 if( pSrc->nSrc+nExtra>=SQLITE_MAX_SRCLIST ){
110468 sqlite3ErrorMsg(pParse, "too many FROM clause terms, max: %d",
110469 SQLITE_MAX_SRCLIST);
@@ -110475,12 +110485,11 @@
110475 if( pNew==0 ){
110476 assert( db->mallocFailed );
110477 return 0;
110478 }
110479 pSrc = pNew;
110480 nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;
110481 pSrc->nAlloc = nGot;
110482 }
110483
110484 /* Move existing slots that come after the newly inserted slots
110485 ** out of the way */
110486 for(i=pSrc->nSrc-1; i>=iStart; i--){
@@ -120462,17 +120471,15 @@
120462 /* ePragFlg: */ PragFlg_Result0,
120463 /* ColNames: */ 0, 0,
120464 /* iArg: */ 0 },
120465 #endif
120466 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120467 #if !defined(SQLITE_OMIT_DEPRECATED)
120468 {/* zName: */ "count_changes",
120469 /* ePragTyp: */ PragTyp_FLAG,
120470 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120471 /* ColNames: */ 0, 0,
120472 /* iArg: */ SQLITE_CountRows },
120473 #endif
120474 #endif
120475 #if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_OS_WIN
120476 {/* zName: */ "data_store_directory",
120477 /* ePragTyp: */ PragTyp_DATA_STORE_DIRECTORY,
120478 /* ePragFlg: */ PragFlg_NoColumns1,
@@ -120491,18 +120498,16 @@
120491 /* ePragTyp: */ PragTyp_DATABASE_LIST,
120492 /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0,
120493 /* ColNames: */ 35, 3,
120494 /* iArg: */ 0 },
120495 #endif
120496 #if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
120497 #if !defined(SQLITE_OMIT_DEPRECATED)
120498 {/* zName: */ "default_cache_size",
120499 /* ePragTyp: */ PragTyp_DEFAULT_CACHE_SIZE,
120500 /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
120501 /* ColNames: */ 45, 1,
120502 /* iArg: */ 0 },
120503 #endif
120504 #endif
120505 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120506 #if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
120507 {/* zName: */ "defer_foreign_keys",
120508 /* ePragTyp: */ PragTyp_FLAG,
@@ -120510,17 +120515,15 @@
120510 /* ColNames: */ 0, 0,
120511 /* iArg: */ SQLITE_DeferFKs },
120512 #endif
120513 #endif
120514 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120515 #if !defined(SQLITE_OMIT_DEPRECATED)
120516 {/* zName: */ "empty_result_callbacks",
120517 /* ePragTyp: */ PragTyp_FLAG,
120518 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120519 /* ColNames: */ 0, 0,
120520 /* iArg: */ SQLITE_NullCallback },
120521 #endif
120522 #endif
120523 #if !defined(SQLITE_OMIT_UTF16)
120524 {/* zName: */ "encoding",
120525 /* ePragTyp: */ PragTyp_ENCODING,
120526 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
@@ -120556,19 +120559,15 @@
120556 /* ePragFlg: */ PragFlg_ReadOnly|PragFlg_Result0,
120557 /* ColNames: */ 0, 0,
120558 /* iArg: */ BTREE_FREE_PAGE_COUNT },
120559 #endif
120560 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120561 #if !defined(SQLITE_OMIT_DEPRECATED)
120562 {/* zName: */ "full_column_names",
120563 /* ePragTyp: */ PragTyp_FLAG,
120564 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120565 /* ColNames: */ 0, 0,
120566 /* iArg: */ SQLITE_FullColNames },
120567 #endif
120568 #endif
120569 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120570 {/* zName: */ "fullfsync",
120571 /* ePragTyp: */ PragTyp_FLAG,
120572 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120573 /* ColNames: */ 0, 0,
120574 /* iArg: */ SQLITE_FullFSync },
@@ -120793,17 +120792,15 @@
120793 /* ePragFlg: */ PragFlg_Result0,
120794 /* ColNames: */ 0, 0,
120795 /* iArg: */ 0 },
120796 #endif
120797 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120798 #if !defined(SQLITE_OMIT_DEPRECATED)
120799 {/* zName: */ "short_column_names",
120800 /* ePragTyp: */ PragTyp_FLAG,
120801 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120802 /* ColNames: */ 0, 0,
120803 /* iArg: */ SQLITE_ShortColNames },
120804 #endif
120805 #endif
120806 {/* zName: */ "shrink_memory",
120807 /* ePragTyp: */ PragTyp_SHRINK_MEMORY,
120808 /* ePragFlg: */ PragFlg_NoColumns,
120809 /* ColNames: */ 0, 0,
@@ -130079,10 +130076,11 @@
130079 ){
130080 continue;
130081 }
130082
130083 if( flattenSubquery(pParse, p, i, isAgg) ){
 
130084 /* This subquery can be absorbed into its parent. */
130085 i = -1;
130086 }
130087 pTabList = p->pSrc;
130088 if( db->mallocFailed ) goto select_end;
@@ -217071,11 +217069,11 @@
217071 int nArg, /* Number of args */
217072 sqlite3_value **apUnused /* Function arguments */
217073 ){
217074 assert( nArg==0 );
217075 UNUSED_PARAM2(nArg, apUnused);
217076 sqlite3_result_text(pCtx, "fts5: 2019-02-05 19:52:39 2f468da4e9fb3edb5e902fa5d3c528726d1fb64d749d29e558ba3243c76bcb95", -1, SQLITE_TRANSIENT);
217077 }
217078
217079 /*
217080 ** Return true if zName is the extension on one of the shadow tables used
217081 ** by this module.
@@ -221835,12 +221833,12 @@
221835 }
221836 #endif /* SQLITE_CORE */
221837 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
221838
221839 /************** End of stmt.c ************************************************/
221840 #if __LINE__!=221840
221841 #undef SQLITE_SOURCE_ID
221842 #define SQLITE_SOURCE_ID "2019-02-05 20:51:41 4d0a949fd92e19fbf243a2e3a1a7c2cdb111f9a6943949d2420dd846bc7dalt2"
221843 #endif
221844 /* Return the source-id for this library */
221845 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
221846 /************************** End of sqlite3.c ******************************/
221847
--- 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.27.0"
1166 #define SQLITE_VERSION_NUMBER 3027000
1167 #define SQLITE_SOURCE_ID "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -48619,16 +48619,26 @@
48619 /*
48620 ** Each cache entry is represented by an instance of the following
48621 ** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of
48622 ** PgHdr1.pCache->szPage bytes is allocated directly before this structure
48623 ** in memory.
48624 **
48625 ** Note: Variables isBulkLocal and isAnchor were once type "u8". That works,
48626 ** but causes a 2-byte gap in the structure for most architectures (since
48627 ** pointers must be either 4 or 8-byte aligned). As this structure is located
48628 ** in memory directly after the associated page data, if the database is
48629 ** corrupt, code at the b-tree layer may overread the page buffer and
48630 ** read part of this structure before the corruption is detected. This
48631 ** can cause a valgrind error if the unitialized gap is accessed. Using u16
48632 ** ensures there is no such gap, and therefore no bytes of unitialized memory
48633 ** in the structure.
48634 */
48635 struct PgHdr1 {
48636 sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */
48637 unsigned int iKey; /* Key value (page number) */
48638 u16 isBulkLocal; /* This page from bulk local storage */
48639 u16 isAnchor; /* This is the PGroup.lru element */
48640 PgHdr1 *pNext; /* Next in hash table chain */
48641 PCache1 *pCache; /* Cache that currently owns this page */
48642 PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
48643 PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
48644 /* NB: pLruPrev is only valid if pLruNext!=0 */
@@ -48830,10 +48840,11 @@
48840 pX->page.pBuf = zBulk;
48841 pX->page.pExtra = &pX[1];
48842 pX->isBulkLocal = 1;
48843 pX->isAnchor = 0;
48844 pX->pNext = pCache->pFree;
48845 pX->pLruPrev = 0; /* Initializing this saves a valgrind error */
48846 pCache->pFree = pX;
48847 zBulk += pCache->szAlloc;
48848 }while( --nBulk );
48849 }
48850 return pCache->pFree!=0;
@@ -110459,11 +110470,10 @@
110470
110471 /* Allocate additional space if needed */
110472 if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
110473 SrcList *pNew;
110474 int nAlloc = pSrc->nSrc*2+nExtra;
 
110475 sqlite3 *db = pParse->db;
110476
110477 if( pSrc->nSrc+nExtra>=SQLITE_MAX_SRCLIST ){
110478 sqlite3ErrorMsg(pParse, "too many FROM clause terms, max: %d",
110479 SQLITE_MAX_SRCLIST);
@@ -110475,12 +110485,11 @@
110485 if( pNew==0 ){
110486 assert( db->mallocFailed );
110487 return 0;
110488 }
110489 pSrc = pNew;
110490 pSrc->nAlloc = nAlloc;
 
110491 }
110492
110493 /* Move existing slots that come after the newly inserted slots
110494 ** out of the way */
110495 for(i=pSrc->nSrc-1; i>=iStart; i--){
@@ -120462,17 +120471,15 @@
120471 /* ePragFlg: */ PragFlg_Result0,
120472 /* ColNames: */ 0, 0,
120473 /* iArg: */ 0 },
120474 #endif
120475 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
 
120476 {/* zName: */ "count_changes",
120477 /* ePragTyp: */ PragTyp_FLAG,
120478 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120479 /* ColNames: */ 0, 0,
120480 /* iArg: */ SQLITE_CountRows },
 
120481 #endif
120482 #if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_OS_WIN
120483 {/* zName: */ "data_store_directory",
120484 /* ePragTyp: */ PragTyp_DATA_STORE_DIRECTORY,
120485 /* ePragFlg: */ PragFlg_NoColumns1,
@@ -120491,18 +120498,16 @@
120498 /* ePragTyp: */ PragTyp_DATABASE_LIST,
120499 /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0,
120500 /* ColNames: */ 35, 3,
120501 /* iArg: */ 0 },
120502 #endif
120503 #if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
 
120504 {/* zName: */ "default_cache_size",
120505 /* ePragTyp: */ PragTyp_DEFAULT_CACHE_SIZE,
120506 /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
120507 /* ColNames: */ 45, 1,
120508 /* iArg: */ 0 },
 
120509 #endif
120510 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
120511 #if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
120512 {/* zName: */ "defer_foreign_keys",
120513 /* ePragTyp: */ PragTyp_FLAG,
@@ -120510,17 +120515,15 @@
120515 /* ColNames: */ 0, 0,
120516 /* iArg: */ SQLITE_DeferFKs },
120517 #endif
120518 #endif
120519 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
 
120520 {/* zName: */ "empty_result_callbacks",
120521 /* ePragTyp: */ PragTyp_FLAG,
120522 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120523 /* ColNames: */ 0, 0,
120524 /* iArg: */ SQLITE_NullCallback },
 
120525 #endif
120526 #if !defined(SQLITE_OMIT_UTF16)
120527 {/* zName: */ "encoding",
120528 /* ePragTyp: */ PragTyp_ENCODING,
120529 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
@@ -120556,19 +120559,15 @@
120559 /* ePragFlg: */ PragFlg_ReadOnly|PragFlg_Result0,
120560 /* ColNames: */ 0, 0,
120561 /* iArg: */ BTREE_FREE_PAGE_COUNT },
120562 #endif
120563 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
 
120564 {/* zName: */ "full_column_names",
120565 /* ePragTyp: */ PragTyp_FLAG,
120566 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120567 /* ColNames: */ 0, 0,
120568 /* iArg: */ SQLITE_FullColNames },
 
 
 
120569 {/* zName: */ "fullfsync",
120570 /* ePragTyp: */ PragTyp_FLAG,
120571 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120572 /* ColNames: */ 0, 0,
120573 /* iArg: */ SQLITE_FullFSync },
@@ -120793,17 +120792,15 @@
120792 /* ePragFlg: */ PragFlg_Result0,
120793 /* ColNames: */ 0, 0,
120794 /* iArg: */ 0 },
120795 #endif
120796 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
 
120797 {/* zName: */ "short_column_names",
120798 /* ePragTyp: */ PragTyp_FLAG,
120799 /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
120800 /* ColNames: */ 0, 0,
120801 /* iArg: */ SQLITE_ShortColNames },
 
120802 #endif
120803 {/* zName: */ "shrink_memory",
120804 /* ePragTyp: */ PragTyp_SHRINK_MEMORY,
120805 /* ePragFlg: */ PragFlg_NoColumns,
120806 /* ColNames: */ 0, 0,
@@ -130079,10 +130076,11 @@
130076 ){
130077 continue;
130078 }
130079
130080 if( flattenSubquery(pParse, p, i, isAgg) ){
130081 if( pParse->nErr ) goto select_end;
130082 /* This subquery can be absorbed into its parent. */
130083 i = -1;
130084 }
130085 pTabList = p->pSrc;
130086 if( db->mallocFailed ) goto select_end;
@@ -217071,11 +217069,11 @@
217069 int nArg, /* Number of args */
217070 sqlite3_value **apUnused /* Function arguments */
217071 ){
217072 assert( nArg==0 );
217073 UNUSED_PARAM2(nArg, apUnused);
217074 sqlite3_result_text(pCtx, "fts5: 2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713", -1, SQLITE_TRANSIENT);
217075 }
217076
217077 /*
217078 ** Return true if zName is the extension on one of the shadow tables used
217079 ** by this module.
@@ -221835,12 +221833,12 @@
221833 }
221834 #endif /* SQLITE_CORE */
221835 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
221836
221837 /************** End of stmt.c ************************************************/
221838 #if __LINE__!=221838
221839 #undef SQLITE_SOURCE_ID
221840 #define SQLITE_SOURCE_ID "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac6alt2"
221841 #endif
221842 /* Return the source-id for this library */
221843 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
221844 /************************** End of sqlite3.c ******************************/
221845
+1 -1
--- 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.27.0"
127127
#define SQLITE_VERSION_NUMBER 3027000
128
-#define SQLITE_SOURCE_ID "2019-02-05 20:51:41 4d0a949fd92e19fbf243a2e3a1a7c2cdb111f9a6943949d2420dd846bc7d9285"
128
+#define SQLITE_SOURCE_ID "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
134134
--- 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.27.0"
127 #define SQLITE_VERSION_NUMBER 3027000
128 #define SQLITE_SOURCE_ID "2019-02-05 20:51:41 4d0a949fd92e19fbf243a2e3a1a7c2cdb111f9a6943949d2420dd846bc7d9285"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134
--- 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.27.0"
127 #define SQLITE_VERSION_NUMBER 3027000
128 #define SQLITE_SOURCE_ID "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134

Keyboard Shortcuts

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