11/******************************************************************************
22** This file is an amalgamation of many separate C source files from SQLite
3- ** version 3.38.3 . By combining all the individual C code files into this
3+ ** version 3.38.5 . By combining all the individual C code files into this
44** single large file, the entire code can be compiled as a single translation
55** unit. This allows many compilers to do optimizations that would not be
66** possible if the files were compiled separately. Performance improvements
@@ -452,9 +452,9 @@ extern "C" {
452452** [sqlite3_libversion_number()], [sqlite3_sourceid()],
453453** [sqlite_version()] and [sqlite_source_id()].
454454*/
455- #define SQLITE_VERSION "3.38.3 "
456- #define SQLITE_VERSION_NUMBER 3038003
457- #define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4 "
455+ #define SQLITE_VERSION "3.38.5 "
456+ #define SQLITE_VERSION_NUMBER 3038005
457+ #define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe "
458458
459459/*
460460** CAPI3REF: Run-Time Library Version Numbers
@@ -88387,6 +88387,8 @@ case OP_Gosub: { /* jump */
8838788387 /* Most jump operations do a goto to this spot in order to update
8838888388 ** the pOp pointer. */
8838988389jump_to_p2:
88390+ assert( pOp->p2>0 ); /* There are never any jumps to instruction 0 */
88391+ assert( pOp->p2<p->nOp ); /* Jumps must be in range */
8839088392 pOp = &aOp[pOp->p2 - 1];
8839188393 break;
8839288394}
@@ -133866,6 +133868,14 @@ SQLITE_PRIVATE void sqlite3ParseObjectInit(Parse *pParse, sqlite3 *db){
133866133868 if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
133867133869}
133868133870
133871+ /*
133872+ ** Maximum number of times that we will try again to prepare a statement
133873+ ** that returns SQLITE_ERROR_RETRY.
133874+ */
133875+ #ifndef SQLITE_MAX_PREPARE_RETRY
133876+ # define SQLITE_MAX_PREPARE_RETRY 25
133877+ #endif
133878+
133869133879/*
133870133880** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
133871133881*/
@@ -134040,7 +134050,7 @@ static int sqlite3LockAndPrepare(
134040134050 rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
134041134051 assert( rc==SQLITE_OK || *ppStmt==0 );
134042134052 if( rc==SQLITE_OK || db->mallocFailed ) break;
134043- }while( rc==SQLITE_ERROR_RETRY
134053+ }while( ( rc==SQLITE_ERROR_RETRY && (cnt++)<SQLITE_MAX_PREPARE_RETRY)
134044134054 || (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt++)==0) );
134045134055 sqlite3BtreeLeaveAll(db);
134046134056 rc = sqlite3ApiExit(db, rc);
@@ -148718,6 +148728,7 @@ static void preserveExpr(IdxExprTrans *pTrans, Expr *pExpr){
148718148728static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
148719148729 IdxExprTrans *pX = p->u.pIdxTrans;
148720148730 if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
148731+ pExpr = sqlite3ExprSkipCollate(pExpr);
148721148732 preserveExpr(pX, pExpr);
148722148733 pExpr->affExpr = sqlite3ExprAffinity(pExpr);
148723148734 pExpr->op = TK_COLUMN;
@@ -148877,6 +148888,8 @@ static SQLITE_NOINLINE void filterPullDown(
148877148888 /* ,--- Because sqlite3ConstructBloomFilter() has will not have set
148878148889 ** vvvvv--' pLevel->regFilter if this were true. */
148879148890 if( NEVER(pLoop->prereq & notReady) ) continue;
148891+ assert( pLevel->addrBrk==0 );
148892+ pLevel->addrBrk = addrNxt;
148880148893 if( pLoop->wsFlags & WHERE_IPK ){
148881148894 WhereTerm *pTerm = pLoop->aLTerm[0];
148882148895 int regRowid;
@@ -148903,6 +148916,7 @@ static SQLITE_NOINLINE void filterPullDown(
148903148916 VdbeCoverage(pParse->pVdbe);
148904148917 }
148905148918 pLevel->regFilter = 0;
148919+ pLevel->addrBrk = 0;
148906148920 }
148907148921}
148908148922
@@ -234497,7 +234511,7 @@ static void fts5SourceIdFunc(
234497234511){
234498234512 assert( nArg==0 );
234499234513 UNUSED_PARAM2(nArg, apUnused);
234500- sqlite3_result_text(pCtx, "fts5: 2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4 ", -1, SQLITE_TRANSIENT);
234514+ sqlite3_result_text(pCtx, "fts5: 2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe ", -1, SQLITE_TRANSIENT);
234501234515}
234502234516
234503234517/*
0 commit comments