| | @@ -1,8 +1,8 @@ |
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | | -** version 3.44.1. By combining all the individual C code files into this |
| 3 | +** version 3.44.2. 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 |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| | @@ -16,11 +16,11 @@ |
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 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 | | -** d295f48e8f367b066b881780c98bdf980a1d. |
| 21 | +** ebead0e7230cd33bcec9f95d2183069565b9. |
| 22 | 22 | */ |
| 23 | 23 | #define SQLITE_CORE 1 |
| 24 | 24 | #define SQLITE_AMALGAMATION 1 |
| 25 | 25 | #ifndef SQLITE_PRIVATE |
| 26 | 26 | # define SQLITE_PRIVATE static |
| | @@ -457,13 +457,13 @@ |
| 457 | 457 | ** |
| 458 | 458 | ** See also: [sqlite3_libversion()], |
| 459 | 459 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 460 | 460 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 461 | 461 | */ |
| 462 | | -#define SQLITE_VERSION "3.44.1" |
| 463 | | -#define SQLITE_VERSION_NUMBER 3044001 |
| 464 | | -#define SQLITE_SOURCE_ID "2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4" |
| 462 | +#define SQLITE_VERSION "3.44.2" |
| 463 | +#define SQLITE_VERSION_NUMBER 3044002 |
| 464 | +#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f" |
| 465 | 465 | |
| 466 | 466 | /* |
| 467 | 467 | ** CAPI3REF: Run-Time Library Version Numbers |
| 468 | 468 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 469 | 469 | ** |
| | @@ -84181,14 +84181,15 @@ |
| 84181 | 84181 | ** sqlite3CorruptError(lineno) |
| 84182 | 84182 | ** sqlite3MisuseError(lineno) |
| 84183 | 84183 | ** sqlite3CantopenError(lineno) |
| 84184 | 84184 | */ |
| 84185 | 84185 | static void test_addop_breakpoint(int pc, Op *pOp){ |
| 84186 | | - static int n = 0; |
| 84186 | + static u64 n = 0; |
| 84187 | 84187 | (void)pc; |
| 84188 | 84188 | (void)pOp; |
| 84189 | 84189 | n++; |
| 84190 | + if( n==LARGEST_UINT64 ) abort(); /* so that n is used, preventing a warning */ |
| 84190 | 84191 | } |
| 84191 | 84192 | #endif |
| 84192 | 84193 | |
| 84193 | 84194 | /* |
| 84194 | 84195 | ** Slow paths for sqlite3VdbeAddOp3() and sqlite3VdbeAddOp4Int() for the |
| | @@ -92328,15 +92329,16 @@ |
| 92328 | 92329 | ** sqlite3CorruptError(lineno) |
| 92329 | 92330 | ** sqlite3MisuseError(lineno) |
| 92330 | 92331 | ** sqlite3CantopenError(lineno) |
| 92331 | 92332 | */ |
| 92332 | 92333 | static void test_trace_breakpoint(int pc, Op *pOp, Vdbe *v){ |
| 92333 | | - static int n = 0; |
| 92334 | + static u64 n = 0; |
| 92334 | 92335 | (void)pc; |
| 92335 | 92336 | (void)pOp; |
| 92336 | 92337 | (void)v; |
| 92337 | 92338 | n++; |
| 92339 | + if( n==LARGEST_UINT64 ) abort(); /* So that n is used, preventing a warning */ |
| 92338 | 92340 | } |
| 92339 | 92341 | #endif |
| 92340 | 92342 | |
| 92341 | 92343 | /* |
| 92342 | 92344 | ** Invoke the VDBE coverage callback, if that callback is defined. This |
| | @@ -143610,11 +143612,12 @@ |
| 143610 | 143612 | Expr *p; |
| 143611 | 143613 | struct ExprList_item *a; |
| 143612 | 143614 | NameContext sNC; |
| 143613 | 143615 | |
| 143614 | 143616 | assert( pSelect!=0 ); |
| 143615 | | - assert( (pSelect->selFlags & SF_Resolved)!=0 ); |
| 143617 | + testcase( (pSelect->selFlags & SF_Resolved)==0 ); |
| 143618 | + assert( (pSelect->selFlags & SF_Resolved)!=0 || IN_RENAME_OBJECT ); |
| 143616 | 143619 | assert( pTab->nCol==pSelect->pEList->nExpr || pParse->nErr>0 ); |
| 143617 | 143620 | assert( aff==SQLITE_AFF_NONE || aff==SQLITE_AFF_BLOB ); |
| 143618 | 143621 | if( db->mallocFailed || IN_RENAME_OBJECT ) return; |
| 143619 | 143622 | while( pSelect->pPrior ) pSelect = pSelect->pPrior; |
| 143620 | 143623 | a = pSelect->pEList->a; |
| | @@ -241504,22 +241507,28 @@ |
| 241504 | 241507 | } |
| 241505 | 241508 | } |
| 241506 | 241509 | |
| 241507 | 241510 | iOff = iStart; |
| 241508 | 241511 | |
| 241509 | | - /* Set variable bLastInDoclist to true if this entry happens to be |
| 241510 | | - ** the last rowid in the doclist for its term. */ |
| 241512 | + /* If the position-list for the entry being removed flows over past |
| 241513 | + ** the end of this page, delete the portion of the position-list on the |
| 241514 | + ** next page and beyond. |
| 241515 | + ** |
| 241516 | + ** Set variable bLastInDoclist to true if this entry happens |
| 241517 | + ** to be the last rowid in the doclist for its term. */ |
| 241518 | + if( iNextOff>=iPgIdx ){ |
| 241519 | + int pgno = pSeg->iLeafPgno+1; |
| 241520 | + fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist); |
| 241521 | + iNextOff = iPgIdx; |
| 241522 | + } |
| 241523 | + |
| 241511 | 241524 | if( pSeg->bDel==0 ){ |
| 241512 | | - if( iNextOff>=iPgIdx ){ |
| 241513 | | - int pgno = pSeg->iLeafPgno+1; |
| 241514 | | - fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist); |
| 241515 | | - iNextOff = iPgIdx; |
| 241516 | | - }else{ |
| 241525 | + if( iNextOff!=iPgIdx ){ |
| 241517 | 241526 | /* Loop through the page-footer. If iNextOff (offset of the |
| 241518 | 241527 | ** entry following the one we are removing) is equal to the |
| 241519 | 241528 | ** offset of a key on this page, then the entry is the last |
| 241520 | | - ** in its doclist. */ |
| 241529 | + ** in its doclist. */ |
| 241521 | 241530 | int iKeyOff = 0; |
| 241522 | 241531 | for(iIdx=0; iIdx<nIdx; /* no-op */){ |
| 241523 | 241532 | u32 iVal = 0; |
| 241524 | 241533 | iIdx += fts5GetVarint32(&aIdx[iIdx], iVal); |
| 241525 | 241534 | iKeyOff += iVal; |
| | @@ -247610,11 +247619,11 @@ |
| 247610 | 247619 | int nArg, /* Number of args */ |
| 247611 | 247620 | sqlite3_value **apUnused /* Function arguments */ |
| 247612 | 247621 | ){ |
| 247613 | 247622 | assert( nArg==0 ); |
| 247614 | 247623 | UNUSED_PARAM2(nArg, apUnused); |
| 247615 | | - sqlite3_result_text(pCtx, "fts5: 2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4", -1, SQLITE_TRANSIENT); |
| 247624 | + sqlite3_result_text(pCtx, "fts5: 2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f", -1, SQLITE_TRANSIENT); |
| 247616 | 247625 | } |
| 247617 | 247626 | |
| 247618 | 247627 | /* |
| 247619 | 247628 | ** Return true if zName is the extension on one of the shadow tables used |
| 247620 | 247629 | ** by this module. |
| 247621 | 247630 | |