@@ -92,7 +92,7 @@ extern SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
9292/*** Begin of #include "sqlite3patched.c" ***/
9393/******************************************************************************
9494** This file is an amalgamation of many separate C source files from SQLite
95- ** version 3.38.3 . By combining all the individual C code files into this
95+ ** version 3.38.5 . By combining all the individual C code files into this
9696** single large file, the entire code can be compiled as a single translation
9797** unit. This allows many compilers to do optimizations that would not be
9898** possible if the files were compiled separately. Performance improvements
@@ -544,9 +544,9 @@ extern "C" {
544544** [sqlite3_libversion_number()], [sqlite3_sourceid()],
545545** [sqlite_version()] and [sqlite_source_id()].
546546*/
547- #define SQLITE_VERSION "3.38.3 "
548- #define SQLITE_VERSION_NUMBER 3038003
549- #define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4 "
547+ #define SQLITE_VERSION "3.38.5 "
548+ #define SQLITE_VERSION_NUMBER 3038005
549+ #define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe "
550550
551551/*
552552** CAPI3REF: Run-Time Library Version Numbers
@@ -88486,6 +88486,8 @@ case OP_Gosub: { /* jump */
8848688486 /* Most jump operations do a goto to this spot in order to update
8848788487 ** the pOp pointer. */
8848888488jump_to_p2:
88489+ assert( pOp->p2>0 ); /* There are never any jumps to instruction 0 */
88490+ assert( pOp->p2<p->nOp ); /* Jumps must be in range */
8848988491 pOp = &aOp[pOp->p2 - 1];
8849088492 break;
8849188493}
@@ -133970,6 +133972,14 @@ SQLITE_PRIVATE void sqlite3ParseObjectInit(Parse *pParse, sqlite3 *db){
133970133972 if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
133971133973}
133972133974
133975+ /*
133976+ ** Maximum number of times that we will try again to prepare a statement
133977+ ** that returns SQLITE_ERROR_RETRY.
133978+ */
133979+ #ifndef SQLITE_MAX_PREPARE_RETRY
133980+ # define SQLITE_MAX_PREPARE_RETRY 25
133981+ #endif
133982+
133973133983/*
133974133984** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
133975133985*/
@@ -134144,7 +134154,7 @@ static int sqlite3LockAndPrepare(
134144134154 rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
134145134155 assert( rc==SQLITE_OK || *ppStmt==0 );
134146134156 if( rc==SQLITE_OK || db->mallocFailed ) break;
134147- }while( rc==SQLITE_ERROR_RETRY
134157+ }while( ( rc==SQLITE_ERROR_RETRY && (cnt++)<SQLITE_MAX_PREPARE_RETRY)
134148134158 || (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt++)==0) );
134149134159 sqlite3BtreeLeaveAll(db);
134150134160 rc = sqlite3ApiExit(db, rc);
@@ -148822,6 +148832,7 @@ static void preserveExpr(IdxExprTrans *pTrans, Expr *pExpr){
148822148832static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
148823148833 IdxExprTrans *pX = p->u.pIdxTrans;
148824148834 if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
148835+ pExpr = sqlite3ExprSkipCollate(pExpr);
148825148836 preserveExpr(pX, pExpr);
148826148837 pExpr->affExpr = sqlite3ExprAffinity(pExpr);
148827148838 pExpr->op = TK_COLUMN;
@@ -148981,6 +148992,8 @@ static SQLITE_NOINLINE void filterPullDown(
148981148992 /* ,--- Because sqlite3ConstructBloomFilter() has will not have set
148982148993 ** vvvvv--' pLevel->regFilter if this were true. */
148983148994 if( NEVER(pLoop->prereq & notReady) ) continue;
148995+ assert( pLevel->addrBrk==0 );
148996+ pLevel->addrBrk = addrNxt;
148984148997 if( pLoop->wsFlags & WHERE_IPK ){
148985148998 WhereTerm *pTerm = pLoop->aLTerm[0];
148986148999 int regRowid;
@@ -149007,6 +149020,7 @@ static SQLITE_NOINLINE void filterPullDown(
149007149020 VdbeCoverage(pParse->pVdbe);
149008149021 }
149009149022 pLevel->regFilter = 0;
149023+ pLevel->addrBrk = 0;
149010149024 }
149011149025}
149012149026
@@ -234606,7 +234620,7 @@ static void fts5SourceIdFunc(
234606234620){
234607234621 assert( nArg==0 );
234608234622 UNUSED_PARAM2(nArg, apUnused);
234609- sqlite3_result_text(pCtx, "fts5: 2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4 ", -1, SQLITE_TRANSIENT);
234623+ sqlite3_result_text(pCtx, "fts5: 2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe ", -1, SQLITE_TRANSIENT);
234610234624}
234611234625
234612234626/*
@@ -239735,9 +239749,9 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
239735239749
239736239750#define SQLITE3MC_VERSION_MAJOR 1
239737239751#define SQLITE3MC_VERSION_MINOR 4
239738- #define SQLITE3MC_VERSION_RELEASE 2
239752+ #define SQLITE3MC_VERSION_RELEASE 3
239739239753#define SQLITE3MC_VERSION_SUBRELEASE 0
239740- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.4.2 "
239754+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.4.3 "
239741239755
239742239756#endif /* SQLITE3MC_VERSION_H_ */
239743239757/*** End of #include "sqlite3mc_version.h" ***/
@@ -239896,9 +239910,9 @@ extern "C" {
239896239910** [sqlite3_libversion_number()], [sqlite3_sourceid()],
239897239911** [sqlite_version()] and [sqlite_source_id()].
239898239912*/
239899- #define SQLITE_VERSION "3.38.3 "
239900- #define SQLITE_VERSION_NUMBER 3038003
239901- #define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4 "
239913+ #define SQLITE_VERSION "3.38.5 "
239914+ #define SQLITE_VERSION_NUMBER 3038005
239915+ #define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe "
239902239916
239903239917/*
239904239918** CAPI3REF: Run-Time Library Version Numbers
@@ -262721,7 +262735,7 @@ sqlite3mcBtreeSetPageSize(Btree* p, int pageSize, int nReserve, int iFix)
262721262735** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
262722262736** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
262723262737**
262724- ** This code is generated by the script rekeyvacuum.sh from SQLite version 3.38.3 amalgamation.
262738+ ** This code is generated by the script rekeyvacuum.sh from SQLite version 3.38.5 amalgamation.
262725262739*/
262726262740SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
262727262741 char **pzErrMsg, /* Write error message here */
0 commit comments