Fossil SCM
Update the built-in SQLite to the official 3.27.0 release version.
Commit
c56fce69f191dc6624ac701559a58d3ef1cb1a2baabd6c7416d0ace3ee03a701
Parent
48b74fce3c50440…
2 files changed
+20
-22
+1
-1
+20
-22
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1162,11 +1162,11 @@ | ||
| 1162 | 1162 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1163 | 1163 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1164 | 1164 | */ |
| 1165 | 1165 | #define SQLITE_VERSION "3.27.0" |
| 1166 | 1166 | #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" | |
| 1168 | 1168 | |
| 1169 | 1169 | /* |
| 1170 | 1170 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1171 | 1171 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1172 | 1172 | ** |
| @@ -48619,16 +48619,26 @@ | ||
| 48619 | 48619 | /* |
| 48620 | 48620 | ** Each cache entry is represented by an instance of the following |
| 48621 | 48621 | ** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of |
| 48622 | 48622 | ** PgHdr1.pCache->szPage bytes is allocated directly before this structure |
| 48623 | 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. | |
| 48624 | 48634 | */ |
| 48625 | 48635 | struct PgHdr1 { |
| 48626 | 48636 | sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */ |
| 48627 | 48637 | 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 */ | |
| 48630 | 48640 | PgHdr1 *pNext; /* Next in hash table chain */ |
| 48631 | 48641 | PCache1 *pCache; /* Cache that currently owns this page */ |
| 48632 | 48642 | PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */ |
| 48633 | 48643 | PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */ |
| 48634 | 48644 | /* NB: pLruPrev is only valid if pLruNext!=0 */ |
| @@ -48830,10 +48840,11 @@ | ||
| 48830 | 48840 | pX->page.pBuf = zBulk; |
| 48831 | 48841 | pX->page.pExtra = &pX[1]; |
| 48832 | 48842 | pX->isBulkLocal = 1; |
| 48833 | 48843 | pX->isAnchor = 0; |
| 48834 | 48844 | pX->pNext = pCache->pFree; |
| 48845 | + pX->pLruPrev = 0; /* Initializing this saves a valgrind error */ | |
| 48835 | 48846 | pCache->pFree = pX; |
| 48836 | 48847 | zBulk += pCache->szAlloc; |
| 48837 | 48848 | }while( --nBulk ); |
| 48838 | 48849 | } |
| 48839 | 48850 | return pCache->pFree!=0; |
| @@ -110459,11 +110470,10 @@ | ||
| 110459 | 110470 | |
| 110460 | 110471 | /* Allocate additional space if needed */ |
| 110461 | 110472 | if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){ |
| 110462 | 110473 | SrcList *pNew; |
| 110463 | 110474 | int nAlloc = pSrc->nSrc*2+nExtra; |
| 110464 | - int nGot; | |
| 110465 | 110475 | sqlite3 *db = pParse->db; |
| 110466 | 110476 | |
| 110467 | 110477 | if( pSrc->nSrc+nExtra>=SQLITE_MAX_SRCLIST ){ |
| 110468 | 110478 | sqlite3ErrorMsg(pParse, "too many FROM clause terms, max: %d", |
| 110469 | 110479 | SQLITE_MAX_SRCLIST); |
| @@ -110475,12 +110485,11 @@ | ||
| 110475 | 110485 | if( pNew==0 ){ |
| 110476 | 110486 | assert( db->mallocFailed ); |
| 110477 | 110487 | return 0; |
| 110478 | 110488 | } |
| 110479 | 110489 | pSrc = pNew; |
| 110480 | - nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1; | |
| 110481 | - pSrc->nAlloc = nGot; | |
| 110490 | + pSrc->nAlloc = nAlloc; | |
| 110482 | 110491 | } |
| 110483 | 110492 | |
| 110484 | 110493 | /* Move existing slots that come after the newly inserted slots |
| 110485 | 110494 | ** out of the way */ |
| 110486 | 110495 | for(i=pSrc->nSrc-1; i>=iStart; i--){ |
| @@ -120462,17 +120471,15 @@ | ||
| 120462 | 120471 | /* ePragFlg: */ PragFlg_Result0, |
| 120463 | 120472 | /* ColNames: */ 0, 0, |
| 120464 | 120473 | /* iArg: */ 0 }, |
| 120465 | 120474 | #endif |
| 120466 | 120475 | #if !defined(SQLITE_OMIT_FLAG_PRAGMAS) |
| 120467 | -#if !defined(SQLITE_OMIT_DEPRECATED) | |
| 120468 | 120476 | {/* zName: */ "count_changes", |
| 120469 | 120477 | /* ePragTyp: */ PragTyp_FLAG, |
| 120470 | 120478 | /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1, |
| 120471 | 120479 | /* ColNames: */ 0, 0, |
| 120472 | 120480 | /* iArg: */ SQLITE_CountRows }, |
| 120473 | -#endif | |
| 120474 | 120481 | #endif |
| 120475 | 120482 | #if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_OS_WIN |
| 120476 | 120483 | {/* zName: */ "data_store_directory", |
| 120477 | 120484 | /* ePragTyp: */ PragTyp_DATA_STORE_DIRECTORY, |
| 120478 | 120485 | /* ePragFlg: */ PragFlg_NoColumns1, |
| @@ -120491,18 +120498,16 @@ | ||
| 120491 | 120498 | /* ePragTyp: */ PragTyp_DATABASE_LIST, |
| 120492 | 120499 | /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0, |
| 120493 | 120500 | /* ColNames: */ 35, 3, |
| 120494 | 120501 | /* iArg: */ 0 }, |
| 120495 | 120502 | #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) | |
| 120498 | 120504 | {/* zName: */ "default_cache_size", |
| 120499 | 120505 | /* ePragTyp: */ PragTyp_DEFAULT_CACHE_SIZE, |
| 120500 | 120506 | /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1, |
| 120501 | 120507 | /* ColNames: */ 45, 1, |
| 120502 | 120508 | /* iArg: */ 0 }, |
| 120503 | -#endif | |
| 120504 | 120509 | #endif |
| 120505 | 120510 | #if !defined(SQLITE_OMIT_FLAG_PRAGMAS) |
| 120506 | 120511 | #if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER) |
| 120507 | 120512 | {/* zName: */ "defer_foreign_keys", |
| 120508 | 120513 | /* ePragTyp: */ PragTyp_FLAG, |
| @@ -120510,17 +120515,15 @@ | ||
| 120510 | 120515 | /* ColNames: */ 0, 0, |
| 120511 | 120516 | /* iArg: */ SQLITE_DeferFKs }, |
| 120512 | 120517 | #endif |
| 120513 | 120518 | #endif |
| 120514 | 120519 | #if !defined(SQLITE_OMIT_FLAG_PRAGMAS) |
| 120515 | -#if !defined(SQLITE_OMIT_DEPRECATED) | |
| 120516 | 120520 | {/* zName: */ "empty_result_callbacks", |
| 120517 | 120521 | /* ePragTyp: */ PragTyp_FLAG, |
| 120518 | 120522 | /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1, |
| 120519 | 120523 | /* ColNames: */ 0, 0, |
| 120520 | 120524 | /* iArg: */ SQLITE_NullCallback }, |
| 120521 | -#endif | |
| 120522 | 120525 | #endif |
| 120523 | 120526 | #if !defined(SQLITE_OMIT_UTF16) |
| 120524 | 120527 | {/* zName: */ "encoding", |
| 120525 | 120528 | /* ePragTyp: */ PragTyp_ENCODING, |
| 120526 | 120529 | /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1, |
| @@ -120556,19 +120559,15 @@ | ||
| 120556 | 120559 | /* ePragFlg: */ PragFlg_ReadOnly|PragFlg_Result0, |
| 120557 | 120560 | /* ColNames: */ 0, 0, |
| 120558 | 120561 | /* iArg: */ BTREE_FREE_PAGE_COUNT }, |
| 120559 | 120562 | #endif |
| 120560 | 120563 | #if !defined(SQLITE_OMIT_FLAG_PRAGMAS) |
| 120561 | -#if !defined(SQLITE_OMIT_DEPRECATED) | |
| 120562 | 120564 | {/* zName: */ "full_column_names", |
| 120563 | 120565 | /* ePragTyp: */ PragTyp_FLAG, |
| 120564 | 120566 | /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1, |
| 120565 | 120567 | /* ColNames: */ 0, 0, |
| 120566 | 120568 | /* iArg: */ SQLITE_FullColNames }, |
| 120567 | -#endif | |
| 120568 | -#endif | |
| 120569 | -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) | |
| 120570 | 120569 | {/* zName: */ "fullfsync", |
| 120571 | 120570 | /* ePragTyp: */ PragTyp_FLAG, |
| 120572 | 120571 | /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1, |
| 120573 | 120572 | /* ColNames: */ 0, 0, |
| 120574 | 120573 | /* iArg: */ SQLITE_FullFSync }, |
| @@ -120793,17 +120792,15 @@ | ||
| 120793 | 120792 | /* ePragFlg: */ PragFlg_Result0, |
| 120794 | 120793 | /* ColNames: */ 0, 0, |
| 120795 | 120794 | /* iArg: */ 0 }, |
| 120796 | 120795 | #endif |
| 120797 | 120796 | #if !defined(SQLITE_OMIT_FLAG_PRAGMAS) |
| 120798 | -#if !defined(SQLITE_OMIT_DEPRECATED) | |
| 120799 | 120797 | {/* zName: */ "short_column_names", |
| 120800 | 120798 | /* ePragTyp: */ PragTyp_FLAG, |
| 120801 | 120799 | /* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1, |
| 120802 | 120800 | /* ColNames: */ 0, 0, |
| 120803 | 120801 | /* iArg: */ SQLITE_ShortColNames }, |
| 120804 | -#endif | |
| 120805 | 120802 | #endif |
| 120806 | 120803 | {/* zName: */ "shrink_memory", |
| 120807 | 120804 | /* ePragTyp: */ PragTyp_SHRINK_MEMORY, |
| 120808 | 120805 | /* ePragFlg: */ PragFlg_NoColumns, |
| 120809 | 120806 | /* ColNames: */ 0, 0, |
| @@ -130079,10 +130076,11 @@ | ||
| 130079 | 130076 | ){ |
| 130080 | 130077 | continue; |
| 130081 | 130078 | } |
| 130082 | 130079 | |
| 130083 | 130080 | if( flattenSubquery(pParse, p, i, isAgg) ){ |
| 130081 | + if( pParse->nErr ) goto select_end; | |
| 130084 | 130082 | /* This subquery can be absorbed into its parent. */ |
| 130085 | 130083 | i = -1; |
| 130086 | 130084 | } |
| 130087 | 130085 | pTabList = p->pSrc; |
| 130088 | 130086 | if( db->mallocFailed ) goto select_end; |
| @@ -217071,11 +217069,11 @@ | ||
| 217071 | 217069 | int nArg, /* Number of args */ |
| 217072 | 217070 | sqlite3_value **apUnused /* Function arguments */ |
| 217073 | 217071 | ){ |
| 217074 | 217072 | assert( nArg==0 ); |
| 217075 | 217073 | 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); | |
| 217077 | 217075 | } |
| 217078 | 217076 | |
| 217079 | 217077 | /* |
| 217080 | 217078 | ** Return true if zName is the extension on one of the shadow tables used |
| 217081 | 217079 | ** by this module. |
| @@ -221835,12 +221833,12 @@ | ||
| 221835 | 221833 | } |
| 221836 | 221834 | #endif /* SQLITE_CORE */ |
| 221837 | 221835 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 221838 | 221836 | |
| 221839 | 221837 | /************** End of stmt.c ************************************************/ |
| 221840 | -#if __LINE__!=221840 | |
| 221838 | +#if __LINE__!=221838 | |
| 221841 | 221839 | #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" | |
| 221843 | 221841 | #endif |
| 221844 | 221842 | /* Return the source-id for this library */ |
| 221845 | 221843 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 221846 | 221844 | /************************** End of sqlite3.c ******************************/ |
| 221847 | 221845 |
| --- 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 @@ | ||
| 123 | 123 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 124 | 124 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 125 | 125 | */ |
| 126 | 126 | #define SQLITE_VERSION "3.27.0" |
| 127 | 127 | #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" | |
| 129 | 129 | |
| 130 | 130 | /* |
| 131 | 131 | ** CAPI3REF: Run-Time Library Version Numbers |
| 132 | 132 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 133 | 133 | ** |
| 134 | 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-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 |