| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | /****************************************************************************** | |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite | |
| 3 | - ** version 3.51.0. By combining all the individual C code files into this | ||
| 3 | + ** version 3.51.1. By combining all the individual C code files into this | ||
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation | |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be | |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements | |
@@ -18,7 +18,7 @@ | |||
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. | |
| 19 | 19 | ** | |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in | |
| 21 | - ** fb2c931ae597f8d00a37574ff67aeed3eced with changes in files: | ||
| 21 | + ** 281fc0e9afc38674b9b0991943b9e9d1e64c with changes in files: | ||
| 22 | 22 | ** | |
| 23 | 23 | ** | |
| 24 | 24 | */ | |
@@ -467,12 +467,12 @@ extern "C" { | |||
| 467 | 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], | |
| 468 | 468 | ** [sqlite_version()] and [sqlite_source_id()]. | |
| 469 | 469 | */ | |
| 470 | - #define SQLITE_VERSION "3.51.0" | ||
| 471 | - #define SQLITE_VERSION_NUMBER 3051000 | ||
| 472 | - #define SQLITE_SOURCE_ID "2025-11-04 19:38:17 fb2c931ae597f8d00a37574ff67aeed3eced4e5547f9120744ae4bfa8e74527b" | ||
| 473 | - #define SQLITE_SCM_BRANCH "trunk" | ||
| 474 | - #define SQLITE_SCM_TAGS "release major-release version-3.51.0" | ||
| 475 | - #define SQLITE_SCM_DATETIME "2025-11-04T19:38:17.314Z" | ||
| 470 | + #define SQLITE_VERSION "3.51.1" | ||
| 471 | + #define SQLITE_VERSION_NUMBER 3051001 | ||
| 472 | + #define SQLITE_SOURCE_ID "2025-11-28 17:28:25 281fc0e9afc38674b9b0991943b9e9d1e64c6cbdb133d35f6f5c87ff6af38a88" | ||
| 473 | + #define SQLITE_SCM_BRANCH "branch-3.51" | ||
| 474 | + #define SQLITE_SCM_TAGS "release version-3.51.1" | ||
| 475 | + #define SQLITE_SCM_DATETIME "2025-11-28T17:28:25.933Z" | ||
| 476 | 476 | ||
| 477 | 477 | /* | |
| 478 | 478 | ** CAPI3REF: Run-Time Library Version Numbers | |
@@ -10747,7 +10747,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle); | |||
| 10747 | 10747 | ** ){ | |
| 10748 | 10748 | ** // do something with pVal | |
| 10749 | 10749 | ** } | |
| 10750 | - ** if( rc!=SQLITE_OK ){ | ||
| 10750 | + ** if( rc!=SQLITE_DONE ){ | ||
| 10751 | 10751 | ** // an error has occurred | |
| 10752 | 10752 | ** } | |
| 10753 | 10753 | ** </pre></blockquote>)^ | |
@@ -38004,6 +38004,7 @@ SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, void *data){ | |||
| 38004 | 38004 | return 0; | |
| 38005 | 38005 | } | |
| 38006 | 38006 | ||
| 38007 | + | ||
| 38007 | 38008 | /************** End of hash.c ************************************************/ | |
| 38008 | 38009 | /************** Begin file opcodes.c *****************************************/ | |
| 38009 | 38010 | /* Automatically generated. Do not edit */ | |
@@ -130655,6 +130656,7 @@ SQLITE_PRIVATE void sqlite3SchemaClear(void *p){ | |||
| 130655 | 130656 | for(pElem=sqliteHashFirst(&temp2); pElem; pElem=sqliteHashNext(pElem)){ | |
| 130656 | 130657 | sqlite3DeleteTrigger(&xdb, (Trigger*)sqliteHashData(pElem)); | |
| 130657 | 130658 | } | |
| 130659 | + | ||
| 130658 | 130660 | sqlite3HashClear(&temp2); | |
| 130659 | 130661 | sqlite3HashInit(&pSchema->tblHash); | |
| 130660 | 130662 | for(pElem=sqliteHashFirst(&temp1); pElem; pElem=sqliteHashNext(pElem)){ | |
@@ -160976,9 +160978,12 @@ SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse *pParse, Module *pMod){ | |||
| 160976 | 160978 | addModuleArgument(pParse, pTab, sqlite3DbStrDup(db, pTab->zName)); | |
| 160977 | 160979 | addModuleArgument(pParse, pTab, 0); | |
| 160978 | 160980 | addModuleArgument(pParse, pTab, sqlite3DbStrDup(db, pTab->zName)); | |
| 160981 | + db->nSchemaLock++; | ||
| 160979 | 160982 | rc = vtabCallConstructor(db, pTab, pMod, pModule->xConnect, &zErr); | |
| 160983 | + db->nSchemaLock--; | ||
| 160980 | 160984 | if( rc ){ | |
| 160981 | 160985 | sqlite3ErrorMsg(pParse, "%s", zErr); | |
| 160986 | + pParse->rc = rc; | ||
| 160982 | 160987 | sqlite3DbFree(db, zErr); | |
| 160983 | 160988 | sqlite3VtabEponymousTableClear(db, pMod); | |
| 160984 | 160989 | } | |
@@ -174040,8 +174045,22 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){ | |||
| 174040 | 174045 | sqlite3VdbeAddOp2(v, OP_Goto, 1, pLevel->p2); | |
| 174041 | 174046 | } | |
| 174042 | 174047 | #endif /* SQLITE_DISABLE_SKIPAHEAD_DISTINCT */ | |
| 174043 | - if( pTabList->a[pLevel->iFrom].fg.fromExists ){ | ||
| 174044 | - sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+2); | ||
| 174048 | + if( pTabList->a[pLevel->iFrom].fg.fromExists && i==pWInfo->nLevel-1 ){ | ||
| 174049 | + /* If the EXISTS-to-JOIN optimization was applied, then the EXISTS | ||
| 174050 | + ** loop(s) will be the inner-most loops of the join. There might be | ||
| 174051 | + ** multiple EXISTS loops, but they will all be nested, and the join | ||
| 174052 | + ** order will not have been changed by the query planner. If the | ||
| 174053 | + ** inner-most EXISTS loop sees a single successful row, it should | ||
| 174054 | + ** break out of *all* EXISTS loops. But only the inner-most of the | ||
| 174055 | + ** nested EXISTS loops should do this breakout. */ | ||
| 174056 | + int nOuter = 0; /* Nr of outer EXISTS that this one is nested within */ | ||
| 174057 | + while( nOuter<i ){ | ||
| 174058 | + if( !pTabList->a[pLevel[-nOuter-1].iFrom].fg.fromExists ) break; | ||
| 174059 | + nOuter++; | ||
| 174060 | + } | ||
| 174061 | + testcase( nOuter>0 ); | ||
| 174062 | + sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel[-nOuter].addrBrk); | ||
| 174063 | + VdbeComment((v, "EXISTS break")); | ||
| 174045 | 174064 | } | |
| 174046 | 174065 | /* The common case: Advance to the next row */ | |
| 174047 | 174066 | if( pLevel->addrCont ) sqlite3VdbeResolveLabel(v, pLevel->addrCont); | |
@@ -186225,6 +186244,7 @@ SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){ | |||
| 186225 | 186244 | /* Clear the TEMP schema separately and last */ | |
| 186226 | 186245 | if( db->aDb[1].pSchema ){ | |
| 186227 | 186246 | sqlite3SchemaClear(db->aDb[1].pSchema); | |
| 186247 | + assert( db->aDb[1].pSchema->trigHash.count==0 ); | ||
| 186228 | 186248 | } | |
| 186229 | 186249 | sqlite3VtabUnlockList(db); | |
| 186230 | 186250 | ||
@@ -187553,7 +187573,7 @@ SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){ | |||
| 187553 | 187573 | */ | |
| 187554 | 187574 | SQLITE_API int sqlite3_set_errmsg(sqlite3 *db, int errcode, const char *zMsg){ | |
| 187555 | 187575 | int rc = SQLITE_OK; | |
| 187556 | - if( !sqlite3SafetyCheckSickOrOk(db) ){ | ||
| 187576 | + if( !sqlite3SafetyCheckOk(db) ){ | ||
| 187557 | 187577 | return SQLITE_MISUSE_BKPT; | |
| 187558 | 187578 | } | |
| 187559 | 187579 | sqlite3_mutex_enter(db->mutex); | |
@@ -249220,6 +249240,7 @@ static void fts5SegIterReverseInitPage(Fts5Index *p, Fts5SegIter *pIter){ | |||
| 249220 | 249240 | while( 1 ){ | |
| 249221 | 249241 | u64 iDelta = 0; | |
| 249222 | 249242 | ||
| 249243 | + if( i>=n ) break; | ||
| 249223 | 249244 | if( eDetail==FTS5_DETAIL_NONE ){ | |
| 249224 | 249245 | /* todo */ | |
| 249225 | 249246 | if( i<n && a[i]==0 ){ | |
@@ -260283,7 +260304,7 @@ static void fts5SourceIdFunc( | |||
| 260283 | 260304 | ){ | |
| 260284 | 260305 | assert( nArg==0 ); | |
| 260285 | 260306 | UNUSED_PARAM2(nArg, apUnused); | |
| 260286 | - sqlite3_result_text(pCtx, "fts5: 2025-11-04 19:38:17 fb2c931ae597f8d00a37574ff67aeed3eced4e5547f9120744ae4bfa8e74527b", -1, SQLITE_TRANSIENT); | ||
| 260307 | + sqlite3_result_text(pCtx, "fts5: 2025-11-28 17:28:25 281fc0e9afc38674b9b0991943b9e9d1e64c6cbdb133d35f6f5c87ff6af38a88", -1, SQLITE_TRANSIENT); | ||
| 260287 | 260308 | } | |
| 260288 | 260309 | ||
| 260289 | 260310 | /* | |
@@ -265104,7 +265125,12 @@ static int fts5VocabOpenMethod( | |||
| 265104 | 265125 | return rc; | |
| 265105 | 265126 | } | |
| 265106 | 265127 | ||
| 265128 | + /* | ||
| 265129 | + ** Restore cursor pCsr to the state it was in immediately after being | ||
| 265130 | + ** created by the xOpen() method. | ||
| 265131 | + */ | ||
| 265107 | 265132 | static void fts5VocabResetCursor(Fts5VocabCursor *pCsr){ | |
| 265133 | + int nCol = pCsr->pFts5->pConfig->nCol; | ||
| 265108 | 265134 | pCsr->rowid = 0; | |
| 265109 | 265135 | sqlite3Fts5IterClose(pCsr->pIter); | |
| 265110 | 265136 | sqlite3Fts5StructureRelease(pCsr->pStruct); | |
@@ -265114,6 +265140,12 @@ static void fts5VocabResetCursor(Fts5VocabCursor *pCsr){ | |||
| 265114 | 265140 | pCsr->nLeTerm = -1; | |
| 265115 | 265141 | pCsr->zLeTerm = 0; | |
| 265116 | 265142 | pCsr->bEof = 0; | |
| 265143 | + pCsr->iCol = 0; | ||
| 265144 | + pCsr->iInstPos = 0; | ||
| 265145 | + pCsr->iInstOff = 0; | ||
| 265146 | + pCsr->colUsed = 0; | ||
| 265147 | + memset(pCsr->aCnt, 0, sizeof(i64)*nCol); | ||
| 265148 | + memset(pCsr->aDoc, 0, sizeof(i64)*nCol); | ||
| 265117 | 265149 | } | |
| 265118 | 265150 | ||
| 265119 | 265151 | /* | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -146,12 +146,12 @@ extern "C" { | |||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], | |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. | |
| 148 | 148 | */ | |
| 149 | - #define SQLITE_VERSION "3.51.0" | ||
| 150 | - #define SQLITE_VERSION_NUMBER 3051000 | ||
| 151 | - #define SQLITE_SOURCE_ID "2025-11-04 19:38:17 fb2c931ae597f8d00a37574ff67aeed3eced4e5547f9120744ae4bfa8e74527b" | ||
| 152 | - #define SQLITE_SCM_BRANCH "trunk" | ||
| 153 | - #define SQLITE_SCM_TAGS "release major-release version-3.51.0" | ||
| 154 | - #define SQLITE_SCM_DATETIME "2025-11-04T19:38:17.314Z" | ||
| 149 | + #define SQLITE_VERSION "3.51.1" | ||
| 150 | + #define SQLITE_VERSION_NUMBER 3051001 | ||
| 151 | + #define SQLITE_SOURCE_ID "2025-11-28 17:28:25 281fc0e9afc38674b9b0991943b9e9d1e64c6cbdb133d35f6f5c87ff6af38a88" | ||
| 152 | + #define SQLITE_SCM_BRANCH "branch-3.51" | ||
| 153 | + #define SQLITE_SCM_TAGS "release version-3.51.1" | ||
| 154 | + #define SQLITE_SCM_DATETIME "2025-11-28T17:28:25.933Z" | ||
| 155 | 155 | ||
| 156 | 156 | /* | |
| 157 | 157 | ** CAPI3REF: Run-Time Library Version Numbers | |
@@ -10426,7 +10426,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle); | |||
| 10426 | 10426 | ** ){ | |
| 10427 | 10427 | ** // do something with pVal | |
| 10428 | 10428 | ** } | |
| 10429 | - ** if( rc!=SQLITE_OK ){ | ||
| 10429 | + ** if( rc!=SQLITE_DONE ){ | ||
| 10430 | 10430 | ** // an error has occurred | |
| 10431 | 10431 | ** } | |
| 10432 | 10432 | ** </pre></blockquote>)^ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments