Fossil SCM
Update the built-in SQLite to the official released version 3.33.0.
Commit
0d6ed8c0b66549a499b940422c05186a419b74111637d7d46c48cd21597a2844
Parent
39a5289b9b7c20a…
2 files changed
+20
-24
+1
-1
+20
-24
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1171,11 +1171,11 @@ | ||
| 1171 | 1171 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1172 | 1172 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1173 | 1173 | */ |
| 1174 | 1174 | #define SQLITE_VERSION "3.33.0" |
| 1175 | 1175 | #define SQLITE_VERSION_NUMBER 3033000 |
| 1176 | -#define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f" | |
| 1176 | +#define SQLITE_SOURCE_ID "2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f" | |
| 1177 | 1177 | |
| 1178 | 1178 | /* |
| 1179 | 1179 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1180 | 1180 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1181 | 1181 | ** |
| @@ -17913,15 +17913,10 @@ | ||
| 17913 | 17913 | int nFunc; /* Number of entries in aFunc[] */ |
| 17914 | 17914 | u32 selId; /* Select to which this AggInfo belongs */ |
| 17915 | 17915 | AggInfo *pNext; /* Next in list of them all */ |
| 17916 | 17916 | }; |
| 17917 | 17917 | |
| 17918 | -/* | |
| 17919 | -** Value for AggInfo.iAggMagic when the structure is valid | |
| 17920 | -*/ | |
| 17921 | -#define AggInfoMagic 0x2059e99e | |
| 17922 | - | |
| 17923 | 17918 | /* |
| 17924 | 17919 | ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. |
| 17925 | 17920 | ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater |
| 17926 | 17921 | ** than 32767 we have to make it 32-bit. 16-bit is preferred because |
| 17927 | 17922 | ** it uses less memory in the Expr object, which is a big memory user |
| @@ -18756,13 +18751,11 @@ | ||
| 18756 | 18751 | |
| 18757 | 18752 | Token sLastToken; /* The last token parsed */ |
| 18758 | 18753 | ynVar nVar; /* Number of '?' variables seen in the SQL so far */ |
| 18759 | 18754 | u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */ |
| 18760 | 18755 | u8 explain; /* True if the EXPLAIN flag is found on the query */ |
| 18761 | -#if !(defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_OMIT_ALTERTABLE)) | |
| 18762 | 18756 | u8 eParseMode; /* PARSE_MODE_XXX constant */ |
| 18763 | -#endif | |
| 18764 | 18757 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 18765 | 18758 | int nVtabLock; /* Number of virtual tables to lock */ |
| 18766 | 18759 | #endif |
| 18767 | 18760 | int nHeight; /* Expression tree height of current sub-select */ |
| 18768 | 18761 | #ifndef SQLITE_OMIT_EXPLAIN |
| @@ -61417,13 +61410,14 @@ | ||
| 61417 | 61410 | i64 nReq = ((i64)mxPage * szPage); |
| 61418 | 61411 | i64 nSize; /* Current size of database file */ |
| 61419 | 61412 | sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_START, 0); |
| 61420 | 61413 | rc = sqlite3OsFileSize(pWal->pDbFd, &nSize); |
| 61421 | 61414 | if( rc==SQLITE_OK && nSize<nReq ){ |
| 61422 | - if( (nSize+(i64)pWal->hdr.mxFrame*szPage)<nReq ){ | |
| 61415 | + if( (nSize+65536+(i64)pWal->hdr.mxFrame*szPage)<nReq ){ | |
| 61423 | 61416 | /* If the size of the final database is larger than the current |
| 61424 | - ** database plus the amount of data in the wal file, then there | |
| 61417 | + ** database plus the amount of data in the wal file, plus the | |
| 61418 | + ** maximum size of the pending-byte page (65536 bytes), then | |
| 61425 | 61419 | ** must be corruption somewhere. */ |
| 61426 | 61420 | rc = SQLITE_CORRUPT_BKPT; |
| 61427 | 61421 | }else{ |
| 61428 | 61422 | sqlite3OsFileControlHint(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT,&nReq); |
| 61429 | 61423 | } |
| @@ -74749,12 +74743,12 @@ | ||
| 74749 | 74743 | } |
| 74750 | 74744 | if( getPageReferenced(&sCheck, i)!=0 && |
| 74751 | 74745 | (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){ |
| 74752 | 74746 | checkAppendMsg(&sCheck, "Pointer map page %d is referenced", i); |
| 74753 | 74747 | } |
| 74748 | +#endif | |
| 74754 | 74749 | } |
| 74755 | -#endif | |
| 74756 | 74750 | } |
| 74757 | 74751 | |
| 74758 | 74752 | /* Clean up and report errors. |
| 74759 | 74753 | */ |
| 74760 | 74754 | integrity_ck_cleanup: |
| @@ -106997,11 +106991,11 @@ | ||
| 106997 | 106991 | } |
| 106998 | 106992 | if( rc==SQLITE_OK && pStep->zTarget ){ |
| 106999 | 106993 | SrcList *pSrc = sqlite3TriggerStepSrc(pParse, pStep); |
| 107000 | 106994 | if( pSrc ){ |
| 107001 | 106995 | int i; |
| 107002 | - for(i=0; i<pSrc->nSrc; i++){ | |
| 106996 | + for(i=0; i<pSrc->nSrc && rc==SQLITE_OK; i++){ | |
| 107003 | 106997 | struct SrcList_item *p = &pSrc->a[i]; |
| 107004 | 106998 | p->pTab = sqlite3LocateTableItem(pParse, 0, p); |
| 107005 | 106999 | p->iCursor = pParse->nTab++; |
| 107006 | 107000 | if( p->pTab==0 ){ |
| 107007 | 107001 | rc = SQLITE_ERROR; |
| @@ -113101,14 +113095,12 @@ | ||
| 113101 | 113095 | ** statement that defines the view. |
| 113102 | 113096 | */ |
| 113103 | 113097 | assert( pTable->pSelect ); |
| 113104 | 113098 | pSel = sqlite3SelectDup(db, pTable->pSelect, 0); |
| 113105 | 113099 | if( pSel ){ |
| 113106 | -#ifndef SQLITE_OMIT_ALTERTABLE | |
| 113107 | 113100 | u8 eParseMode = pParse->eParseMode; |
| 113108 | 113101 | pParse->eParseMode = PARSE_MODE_NORMAL; |
| 113109 | -#endif | |
| 113110 | 113102 | n = pParse->nTab; |
| 113111 | 113103 | sqlite3SrcListAssignCursors(pParse, pSel->pSrc); |
| 113112 | 113104 | pTable->nCol = -1; |
| 113113 | 113105 | DisableLookaside; |
| 113114 | 113106 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| @@ -113152,13 +113144,11 @@ | ||
| 113152 | 113144 | } |
| 113153 | 113145 | pTable->nNVCol = pTable->nCol; |
| 113154 | 113146 | sqlite3DeleteTable(db, pSelTab); |
| 113155 | 113147 | sqlite3SelectDelete(db, pSel); |
| 113156 | 113148 | EnableLookaside; |
| 113157 | -#ifndef SQLITE_OMIT_ALTERTABLE | |
| 113158 | 113149 | pParse->eParseMode = eParseMode; |
| 113159 | -#endif | |
| 113160 | 113150 | } else { |
| 113161 | 113151 | nErr++; |
| 113162 | 113152 | } |
| 113163 | 113153 | pTable->pSchema->schemaFlags |= DB_UnresetViews; |
| 113164 | 113154 | if( db->mallocFailed ){ |
| @@ -114492,11 +114482,11 @@ | ||
| 114492 | 114482 | ** |
| 114493 | 114483 | ** 2020-05-27: If some of the stat data is coming from the sqlite_stat1 |
| 114494 | 114484 | ** table but other parts we are having to guess at, then do not let the |
| 114495 | 114485 | ** estimated number of rows in the table be less than 1000 (LogEst 99). |
| 114496 | 114486 | ** Failure to do this can cause the indexes for which we do not have |
| 114497 | - ** stat1 data to be ignored by the query planner. tag-20200527-1 | |
| 114487 | + ** stat1 data to be ignored by the query planner. | |
| 114498 | 114488 | */ |
| 114499 | 114489 | x = pIdx->pTable->nRowLogEst; |
| 114500 | 114490 | assert( 99==sqlite3LogEst(1000) ); |
| 114501 | 114491 | if( x<99 ){ |
| 114502 | 114492 | pIdx->pTable->nRowLogEst = x = 99; |
| @@ -165102,11 +165092,11 @@ | ||
| 165102 | 165092 | ** on, but it is sometimes useful to turn it off for testing. |
| 165103 | 165093 | ** |
| 165104 | 165094 | ** 2020-07-22: Disabling EXTRA_SCHEMA_CHECKS also disables the |
| 165105 | 165095 | ** verification of rootpage numbers when parsing the schema. This |
| 165106 | 165096 | ** is useful to make it easier to reach strange internal error states |
| 165107 | - ** during testing. The EXTRA_SCHEMA_CHECKS settting is always enabled | |
| 165097 | + ** during testing. The EXTRA_SCHEMA_CHECKS setting is always enabled | |
| 165108 | 165098 | ** in production. |
| 165109 | 165099 | */ |
| 165110 | 165100 | case SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: { |
| 165111 | 165101 | sqlite3GlobalConfig.bExtraSchemaChecks = va_arg(ap, int); |
| 165112 | 165102 | break; |
| @@ -176829,11 +176819,12 @@ | ||
| 176829 | 176819 | rc = fts3tokQueryTokenizer((Fts3Hash*)pHash, zModule, &pMod, pzErr); |
| 176830 | 176820 | } |
| 176831 | 176821 | |
| 176832 | 176822 | assert( (rc==SQLITE_OK)==(pMod!=0) ); |
| 176833 | 176823 | if( rc==SQLITE_OK ){ |
| 176834 | - const char * const *azArg = (const char * const *)&azDequote[1]; | |
| 176824 | + const char * const *azArg = 0; | |
| 176825 | + if( nDequote>1 ) azArg = (const char * const *)&azDequote[1]; | |
| 176835 | 176826 | rc = pMod->xCreate((nDequote>1 ? nDequote-1 : 0), azArg, &pTok); |
| 176836 | 176827 | } |
| 176837 | 176828 | |
| 176838 | 176829 | if( rc==SQLITE_OK ){ |
| 176839 | 176830 | pTab = (Fts3tokTable *)sqlite3_malloc(sizeof(Fts3tokTable)); |
| @@ -205397,12 +205388,17 @@ | ||
| 205397 | 205388 | memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy); |
| 205398 | 205389 | p->in.iNext += nCopy; |
| 205399 | 205390 | } |
| 205400 | 205391 | |
| 205401 | 205392 | p->apValue = (sqlite3_value**)p->tblhdr.aBuf; |
| 205402 | - p->abPK = (u8*)&p->apValue[p->nCol*2]; | |
| 205403 | - p->zTab = (char*)&p->abPK[p->nCol]; | |
| 205393 | + if( p->apValue==0 ){ | |
| 205394 | + p->abPK = 0; | |
| 205395 | + p->zTab = 0; | |
| 205396 | + }else{ | |
| 205397 | + p->abPK = (u8*)&p->apValue[p->nCol*2]; | |
| 205398 | + p->zTab = p->abPK ? (char*)&p->abPK[p->nCol] : 0; | |
| 205399 | + } | |
| 205404 | 205400 | return (p->rc = rc); |
| 205405 | 205401 | } |
| 205406 | 205402 | |
| 205407 | 205403 | /* |
| 205408 | 205404 | ** Advance the changeset iterator to the next change. |
| @@ -225727,11 +225723,11 @@ | ||
| 225727 | 225723 | int nArg, /* Number of args */ |
| 225728 | 225724 | sqlite3_value **apUnused /* Function arguments */ |
| 225729 | 225725 | ){ |
| 225730 | 225726 | assert( nArg==0 ); |
| 225731 | 225727 | UNUSED_PARAM2(nArg, apUnused); |
| 225732 | - sqlite3_result_text(pCtx, "fts5: 2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f", -1, SQLITE_TRANSIENT); | |
| 225728 | + sqlite3_result_text(pCtx, "fts5: 2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f", -1, SQLITE_TRANSIENT); | |
| 225733 | 225729 | } |
| 225734 | 225730 | |
| 225735 | 225731 | /* |
| 225736 | 225732 | ** Return true if zName is the extension on one of the shadow tables used |
| 225737 | 225733 | ** by this module. |
| @@ -230510,12 +230506,12 @@ | ||
| 230510 | 230506 | } |
| 230511 | 230507 | #endif /* SQLITE_CORE */ |
| 230512 | 230508 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 230513 | 230509 | |
| 230514 | 230510 | /************** End of stmt.c ************************************************/ |
| 230515 | -#if __LINE__!=230515 | |
| 230511 | +#if __LINE__!=230511 | |
| 230516 | 230512 | #undef SQLITE_SOURCE_ID |
| 230517 | -#define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff7alt2" | |
| 230513 | +#define SQLITE_SOURCE_ID "2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0alt2" | |
| 230518 | 230514 | #endif |
| 230519 | 230515 | /* Return the source-id for this library */ |
| 230520 | 230516 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 230521 | 230517 | /************************** End of sqlite3.c ******************************/ |
| 230522 | 230518 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1171,11 +1171,11 @@ | |
| 1171 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1172 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1173 | */ |
| 1174 | #define SQLITE_VERSION "3.33.0" |
| 1175 | #define SQLITE_VERSION_NUMBER 3033000 |
| 1176 | #define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f" |
| 1177 | |
| 1178 | /* |
| 1179 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1180 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1181 | ** |
| @@ -17913,15 +17913,10 @@ | |
| 17913 | int nFunc; /* Number of entries in aFunc[] */ |
| 17914 | u32 selId; /* Select to which this AggInfo belongs */ |
| 17915 | AggInfo *pNext; /* Next in list of them all */ |
| 17916 | }; |
| 17917 | |
| 17918 | /* |
| 17919 | ** Value for AggInfo.iAggMagic when the structure is valid |
| 17920 | */ |
| 17921 | #define AggInfoMagic 0x2059e99e |
| 17922 | |
| 17923 | /* |
| 17924 | ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. |
| 17925 | ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater |
| 17926 | ** than 32767 we have to make it 32-bit. 16-bit is preferred because |
| 17927 | ** it uses less memory in the Expr object, which is a big memory user |
| @@ -18756,13 +18751,11 @@ | |
| 18756 | |
| 18757 | Token sLastToken; /* The last token parsed */ |
| 18758 | ynVar nVar; /* Number of '?' variables seen in the SQL so far */ |
| 18759 | u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */ |
| 18760 | u8 explain; /* True if the EXPLAIN flag is found on the query */ |
| 18761 | #if !(defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_OMIT_ALTERTABLE)) |
| 18762 | u8 eParseMode; /* PARSE_MODE_XXX constant */ |
| 18763 | #endif |
| 18764 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 18765 | int nVtabLock; /* Number of virtual tables to lock */ |
| 18766 | #endif |
| 18767 | int nHeight; /* Expression tree height of current sub-select */ |
| 18768 | #ifndef SQLITE_OMIT_EXPLAIN |
| @@ -61417,13 +61410,14 @@ | |
| 61417 | i64 nReq = ((i64)mxPage * szPage); |
| 61418 | i64 nSize; /* Current size of database file */ |
| 61419 | sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_START, 0); |
| 61420 | rc = sqlite3OsFileSize(pWal->pDbFd, &nSize); |
| 61421 | if( rc==SQLITE_OK && nSize<nReq ){ |
| 61422 | if( (nSize+(i64)pWal->hdr.mxFrame*szPage)<nReq ){ |
| 61423 | /* If the size of the final database is larger than the current |
| 61424 | ** database plus the amount of data in the wal file, then there |
| 61425 | ** must be corruption somewhere. */ |
| 61426 | rc = SQLITE_CORRUPT_BKPT; |
| 61427 | }else{ |
| 61428 | sqlite3OsFileControlHint(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT,&nReq); |
| 61429 | } |
| @@ -74749,12 +74743,12 @@ | |
| 74749 | } |
| 74750 | if( getPageReferenced(&sCheck, i)!=0 && |
| 74751 | (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){ |
| 74752 | checkAppendMsg(&sCheck, "Pointer map page %d is referenced", i); |
| 74753 | } |
| 74754 | } |
| 74755 | #endif |
| 74756 | } |
| 74757 | |
| 74758 | /* Clean up and report errors. |
| 74759 | */ |
| 74760 | integrity_ck_cleanup: |
| @@ -106997,11 +106991,11 @@ | |
| 106997 | } |
| 106998 | if( rc==SQLITE_OK && pStep->zTarget ){ |
| 106999 | SrcList *pSrc = sqlite3TriggerStepSrc(pParse, pStep); |
| 107000 | if( pSrc ){ |
| 107001 | int i; |
| 107002 | for(i=0; i<pSrc->nSrc; i++){ |
| 107003 | struct SrcList_item *p = &pSrc->a[i]; |
| 107004 | p->pTab = sqlite3LocateTableItem(pParse, 0, p); |
| 107005 | p->iCursor = pParse->nTab++; |
| 107006 | if( p->pTab==0 ){ |
| 107007 | rc = SQLITE_ERROR; |
| @@ -113101,14 +113095,12 @@ | |
| 113101 | ** statement that defines the view. |
| 113102 | */ |
| 113103 | assert( pTable->pSelect ); |
| 113104 | pSel = sqlite3SelectDup(db, pTable->pSelect, 0); |
| 113105 | if( pSel ){ |
| 113106 | #ifndef SQLITE_OMIT_ALTERTABLE |
| 113107 | u8 eParseMode = pParse->eParseMode; |
| 113108 | pParse->eParseMode = PARSE_MODE_NORMAL; |
| 113109 | #endif |
| 113110 | n = pParse->nTab; |
| 113111 | sqlite3SrcListAssignCursors(pParse, pSel->pSrc); |
| 113112 | pTable->nCol = -1; |
| 113113 | DisableLookaside; |
| 113114 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| @@ -113152,13 +113144,11 @@ | |
| 113152 | } |
| 113153 | pTable->nNVCol = pTable->nCol; |
| 113154 | sqlite3DeleteTable(db, pSelTab); |
| 113155 | sqlite3SelectDelete(db, pSel); |
| 113156 | EnableLookaside; |
| 113157 | #ifndef SQLITE_OMIT_ALTERTABLE |
| 113158 | pParse->eParseMode = eParseMode; |
| 113159 | #endif |
| 113160 | } else { |
| 113161 | nErr++; |
| 113162 | } |
| 113163 | pTable->pSchema->schemaFlags |= DB_UnresetViews; |
| 113164 | if( db->mallocFailed ){ |
| @@ -114492,11 +114482,11 @@ | |
| 114492 | ** |
| 114493 | ** 2020-05-27: If some of the stat data is coming from the sqlite_stat1 |
| 114494 | ** table but other parts we are having to guess at, then do not let the |
| 114495 | ** estimated number of rows in the table be less than 1000 (LogEst 99). |
| 114496 | ** Failure to do this can cause the indexes for which we do not have |
| 114497 | ** stat1 data to be ignored by the query planner. tag-20200527-1 |
| 114498 | */ |
| 114499 | x = pIdx->pTable->nRowLogEst; |
| 114500 | assert( 99==sqlite3LogEst(1000) ); |
| 114501 | if( x<99 ){ |
| 114502 | pIdx->pTable->nRowLogEst = x = 99; |
| @@ -165102,11 +165092,11 @@ | |
| 165102 | ** on, but it is sometimes useful to turn it off for testing. |
| 165103 | ** |
| 165104 | ** 2020-07-22: Disabling EXTRA_SCHEMA_CHECKS also disables the |
| 165105 | ** verification of rootpage numbers when parsing the schema. This |
| 165106 | ** is useful to make it easier to reach strange internal error states |
| 165107 | ** during testing. The EXTRA_SCHEMA_CHECKS settting is always enabled |
| 165108 | ** in production. |
| 165109 | */ |
| 165110 | case SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: { |
| 165111 | sqlite3GlobalConfig.bExtraSchemaChecks = va_arg(ap, int); |
| 165112 | break; |
| @@ -176829,11 +176819,12 @@ | |
| 176829 | rc = fts3tokQueryTokenizer((Fts3Hash*)pHash, zModule, &pMod, pzErr); |
| 176830 | } |
| 176831 | |
| 176832 | assert( (rc==SQLITE_OK)==(pMod!=0) ); |
| 176833 | if( rc==SQLITE_OK ){ |
| 176834 | const char * const *azArg = (const char * const *)&azDequote[1]; |
| 176835 | rc = pMod->xCreate((nDequote>1 ? nDequote-1 : 0), azArg, &pTok); |
| 176836 | } |
| 176837 | |
| 176838 | if( rc==SQLITE_OK ){ |
| 176839 | pTab = (Fts3tokTable *)sqlite3_malloc(sizeof(Fts3tokTable)); |
| @@ -205397,12 +205388,17 @@ | |
| 205397 | memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy); |
| 205398 | p->in.iNext += nCopy; |
| 205399 | } |
| 205400 | |
| 205401 | p->apValue = (sqlite3_value**)p->tblhdr.aBuf; |
| 205402 | p->abPK = (u8*)&p->apValue[p->nCol*2]; |
| 205403 | p->zTab = (char*)&p->abPK[p->nCol]; |
| 205404 | return (p->rc = rc); |
| 205405 | } |
| 205406 | |
| 205407 | /* |
| 205408 | ** Advance the changeset iterator to the next change. |
| @@ -225727,11 +225723,11 @@ | |
| 225727 | int nArg, /* Number of args */ |
| 225728 | sqlite3_value **apUnused /* Function arguments */ |
| 225729 | ){ |
| 225730 | assert( nArg==0 ); |
| 225731 | UNUSED_PARAM2(nArg, apUnused); |
| 225732 | sqlite3_result_text(pCtx, "fts5: 2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f", -1, SQLITE_TRANSIENT); |
| 225733 | } |
| 225734 | |
| 225735 | /* |
| 225736 | ** Return true if zName is the extension on one of the shadow tables used |
| 225737 | ** by this module. |
| @@ -230510,12 +230506,12 @@ | |
| 230510 | } |
| 230511 | #endif /* SQLITE_CORE */ |
| 230512 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 230513 | |
| 230514 | /************** End of stmt.c ************************************************/ |
| 230515 | #if __LINE__!=230515 |
| 230516 | #undef SQLITE_SOURCE_ID |
| 230517 | #define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff7alt2" |
| 230518 | #endif |
| 230519 | /* Return the source-id for this library */ |
| 230520 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 230521 | /************************** End of sqlite3.c ******************************/ |
| 230522 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1171,11 +1171,11 @@ | |
| 1171 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1172 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1173 | */ |
| 1174 | #define SQLITE_VERSION "3.33.0" |
| 1175 | #define SQLITE_VERSION_NUMBER 3033000 |
| 1176 | #define SQLITE_SOURCE_ID "2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f" |
| 1177 | |
| 1178 | /* |
| 1179 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1180 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1181 | ** |
| @@ -17913,15 +17913,10 @@ | |
| 17913 | int nFunc; /* Number of entries in aFunc[] */ |
| 17914 | u32 selId; /* Select to which this AggInfo belongs */ |
| 17915 | AggInfo *pNext; /* Next in list of them all */ |
| 17916 | }; |
| 17917 | |
| 17918 | /* |
| 17919 | ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. |
| 17920 | ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater |
| 17921 | ** than 32767 we have to make it 32-bit. 16-bit is preferred because |
| 17922 | ** it uses less memory in the Expr object, which is a big memory user |
| @@ -18756,13 +18751,11 @@ | |
| 18751 | |
| 18752 | Token sLastToken; /* The last token parsed */ |
| 18753 | ynVar nVar; /* Number of '?' variables seen in the SQL so far */ |
| 18754 | u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */ |
| 18755 | u8 explain; /* True if the EXPLAIN flag is found on the query */ |
| 18756 | u8 eParseMode; /* PARSE_MODE_XXX constant */ |
| 18757 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 18758 | int nVtabLock; /* Number of virtual tables to lock */ |
| 18759 | #endif |
| 18760 | int nHeight; /* Expression tree height of current sub-select */ |
| 18761 | #ifndef SQLITE_OMIT_EXPLAIN |
| @@ -61417,13 +61410,14 @@ | |
| 61410 | i64 nReq = ((i64)mxPage * szPage); |
| 61411 | i64 nSize; /* Current size of database file */ |
| 61412 | sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_START, 0); |
| 61413 | rc = sqlite3OsFileSize(pWal->pDbFd, &nSize); |
| 61414 | if( rc==SQLITE_OK && nSize<nReq ){ |
| 61415 | if( (nSize+65536+(i64)pWal->hdr.mxFrame*szPage)<nReq ){ |
| 61416 | /* If the size of the final database is larger than the current |
| 61417 | ** database plus the amount of data in the wal file, plus the |
| 61418 | ** maximum size of the pending-byte page (65536 bytes), then |
| 61419 | ** must be corruption somewhere. */ |
| 61420 | rc = SQLITE_CORRUPT_BKPT; |
| 61421 | }else{ |
| 61422 | sqlite3OsFileControlHint(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT,&nReq); |
| 61423 | } |
| @@ -74749,12 +74743,12 @@ | |
| 74743 | } |
| 74744 | if( getPageReferenced(&sCheck, i)!=0 && |
| 74745 | (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){ |
| 74746 | checkAppendMsg(&sCheck, "Pointer map page %d is referenced", i); |
| 74747 | } |
| 74748 | #endif |
| 74749 | } |
| 74750 | } |
| 74751 | |
| 74752 | /* Clean up and report errors. |
| 74753 | */ |
| 74754 | integrity_ck_cleanup: |
| @@ -106997,11 +106991,11 @@ | |
| 106991 | } |
| 106992 | if( rc==SQLITE_OK && pStep->zTarget ){ |
| 106993 | SrcList *pSrc = sqlite3TriggerStepSrc(pParse, pStep); |
| 106994 | if( pSrc ){ |
| 106995 | int i; |
| 106996 | for(i=0; i<pSrc->nSrc && rc==SQLITE_OK; i++){ |
| 106997 | struct SrcList_item *p = &pSrc->a[i]; |
| 106998 | p->pTab = sqlite3LocateTableItem(pParse, 0, p); |
| 106999 | p->iCursor = pParse->nTab++; |
| 107000 | if( p->pTab==0 ){ |
| 107001 | rc = SQLITE_ERROR; |
| @@ -113101,14 +113095,12 @@ | |
| 113095 | ** statement that defines the view. |
| 113096 | */ |
| 113097 | assert( pTable->pSelect ); |
| 113098 | pSel = sqlite3SelectDup(db, pTable->pSelect, 0); |
| 113099 | if( pSel ){ |
| 113100 | u8 eParseMode = pParse->eParseMode; |
| 113101 | pParse->eParseMode = PARSE_MODE_NORMAL; |
| 113102 | n = pParse->nTab; |
| 113103 | sqlite3SrcListAssignCursors(pParse, pSel->pSrc); |
| 113104 | pTable->nCol = -1; |
| 113105 | DisableLookaside; |
| 113106 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| @@ -113152,13 +113144,11 @@ | |
| 113144 | } |
| 113145 | pTable->nNVCol = pTable->nCol; |
| 113146 | sqlite3DeleteTable(db, pSelTab); |
| 113147 | sqlite3SelectDelete(db, pSel); |
| 113148 | EnableLookaside; |
| 113149 | pParse->eParseMode = eParseMode; |
| 113150 | } else { |
| 113151 | nErr++; |
| 113152 | } |
| 113153 | pTable->pSchema->schemaFlags |= DB_UnresetViews; |
| 113154 | if( db->mallocFailed ){ |
| @@ -114492,11 +114482,11 @@ | |
| 114482 | ** |
| 114483 | ** 2020-05-27: If some of the stat data is coming from the sqlite_stat1 |
| 114484 | ** table but other parts we are having to guess at, then do not let the |
| 114485 | ** estimated number of rows in the table be less than 1000 (LogEst 99). |
| 114486 | ** Failure to do this can cause the indexes for which we do not have |
| 114487 | ** stat1 data to be ignored by the query planner. |
| 114488 | */ |
| 114489 | x = pIdx->pTable->nRowLogEst; |
| 114490 | assert( 99==sqlite3LogEst(1000) ); |
| 114491 | if( x<99 ){ |
| 114492 | pIdx->pTable->nRowLogEst = x = 99; |
| @@ -165102,11 +165092,11 @@ | |
| 165092 | ** on, but it is sometimes useful to turn it off for testing. |
| 165093 | ** |
| 165094 | ** 2020-07-22: Disabling EXTRA_SCHEMA_CHECKS also disables the |
| 165095 | ** verification of rootpage numbers when parsing the schema. This |
| 165096 | ** is useful to make it easier to reach strange internal error states |
| 165097 | ** during testing. The EXTRA_SCHEMA_CHECKS setting is always enabled |
| 165098 | ** in production. |
| 165099 | */ |
| 165100 | case SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: { |
| 165101 | sqlite3GlobalConfig.bExtraSchemaChecks = va_arg(ap, int); |
| 165102 | break; |
| @@ -176829,11 +176819,12 @@ | |
| 176819 | rc = fts3tokQueryTokenizer((Fts3Hash*)pHash, zModule, &pMod, pzErr); |
| 176820 | } |
| 176821 | |
| 176822 | assert( (rc==SQLITE_OK)==(pMod!=0) ); |
| 176823 | if( rc==SQLITE_OK ){ |
| 176824 | const char * const *azArg = 0; |
| 176825 | if( nDequote>1 ) azArg = (const char * const *)&azDequote[1]; |
| 176826 | rc = pMod->xCreate((nDequote>1 ? nDequote-1 : 0), azArg, &pTok); |
| 176827 | } |
| 176828 | |
| 176829 | if( rc==SQLITE_OK ){ |
| 176830 | pTab = (Fts3tokTable *)sqlite3_malloc(sizeof(Fts3tokTable)); |
| @@ -205397,12 +205388,17 @@ | |
| 205388 | memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy); |
| 205389 | p->in.iNext += nCopy; |
| 205390 | } |
| 205391 | |
| 205392 | p->apValue = (sqlite3_value**)p->tblhdr.aBuf; |
| 205393 | if( p->apValue==0 ){ |
| 205394 | p->abPK = 0; |
| 205395 | p->zTab = 0; |
| 205396 | }else{ |
| 205397 | p->abPK = (u8*)&p->apValue[p->nCol*2]; |
| 205398 | p->zTab = p->abPK ? (char*)&p->abPK[p->nCol] : 0; |
| 205399 | } |
| 205400 | return (p->rc = rc); |
| 205401 | } |
| 205402 | |
| 205403 | /* |
| 205404 | ** Advance the changeset iterator to the next change. |
| @@ -225727,11 +225723,11 @@ | |
| 225723 | int nArg, /* Number of args */ |
| 225724 | sqlite3_value **apUnused /* Function arguments */ |
| 225725 | ){ |
| 225726 | assert( nArg==0 ); |
| 225727 | UNUSED_PARAM2(nArg, apUnused); |
| 225728 | sqlite3_result_text(pCtx, "fts5: 2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f", -1, SQLITE_TRANSIENT); |
| 225729 | } |
| 225730 | |
| 225731 | /* |
| 225732 | ** Return true if zName is the extension on one of the shadow tables used |
| 225733 | ** by this module. |
| @@ -230510,12 +230506,12 @@ | |
| 230506 | } |
| 230507 | #endif /* SQLITE_CORE */ |
| 230508 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 230509 | |
| 230510 | /************** End of stmt.c ************************************************/ |
| 230511 | #if __LINE__!=230511 |
| 230512 | #undef SQLITE_SOURCE_ID |
| 230513 | #define SQLITE_SOURCE_ID "2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0alt2" |
| 230514 | #endif |
| 230515 | /* Return the source-id for this library */ |
| 230516 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 230517 | /************************** End of sqlite3.c ******************************/ |
| 230518 |
+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.33.0" |
| 127 | 127 | #define SQLITE_VERSION_NUMBER 3033000 |
| 128 | -#define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f" | |
| 128 | +#define SQLITE_SOURCE_ID "2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f" | |
| 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.33.0" |
| 127 | #define SQLITE_VERSION_NUMBER 3033000 |
| 128 | #define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f" |
| 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.33.0" |
| 127 | #define SQLITE_VERSION_NUMBER 3033000 |
| 128 | #define SQLITE_SOURCE_ID "2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f" |
| 129 | |
| 130 | /* |
| 131 | ** CAPI3REF: Run-Time Library Version Numbers |
| 132 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 133 | ** |
| 134 |