| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4c9251f commit 8a26426
2 files changed
| 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.53.0. By combining all the individual C code files into this | ||
| 3 | + ** version 3.53.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 | - ** 4525003a53a7fc63ca75c59b22c79608659c with changes in files: | ||
| 21 | + ** c88b22011a54b4f6fbd149e9f8e4de77658c 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.53.0" | ||
| 471 | - #define SQLITE_VERSION_NUMBER 3053000 | ||
| 472 | - #define SQLITE_SOURCE_ID "2026-04-09 11:41:38 4525003a53a7fc63ca75c59b22c79608659ca12f0131f52c18637f829977f20b" | ||
| 473 | - #define SQLITE_SCM_BRANCH "trunk" | ||
| 474 | - #define SQLITE_SCM_TAGS "release major-release version-3.53.0" | ||
| 475 | - #define SQLITE_SCM_DATETIME "2026-04-09T11:41:38.498Z" | ||
| 470 | + #define SQLITE_VERSION "3.53.1" | ||
| 471 | + #define SQLITE_VERSION_NUMBER 3053001 | ||
| 472 | + #define SQLITE_SOURCE_ID "2026-05-05 10:34:17 c88b22011a54b4f6fbd149e9f8e4de77658ce58143a1af0e3785e4e6475127e9" | ||
| 473 | + #define SQLITE_SCM_BRANCH "branch-3.53" | ||
| 474 | + #define SQLITE_SCM_TAGS "release version-3.53.1" | ||
| 475 | + #define SQLITE_SCM_DATETIME "2026-05-05T10:34:17.344Z" | ||
| 476 | 476 | ||
| 477 | 477 | /* | |
| 478 | 478 | ** CAPI3REF: Run-Time Library Version Numbers | |
@@ -32513,7 +32513,7 @@ static char *printfTempBuf(sqlite3_str *pAccum, sqlite3_int64 n){ | |||
| 32513 | 32513 | sqlite3StrAccumSetError(pAccum, SQLITE_TOOBIG); | |
| 32514 | 32514 | return 0; | |
| 32515 | 32515 | } | |
| 32516 | - z = sqlite3DbMallocRaw(pAccum->db, n); | ||
| 32516 | + z = sqlite3_malloc(n); | ||
| 32517 | 32517 | if( z==0 ){ | |
| 32518 | 32518 | sqlite3StrAccumSetError(pAccum, SQLITE_NOMEM); | |
| 32519 | 32519 | } | |
@@ -32971,11 +32971,27 @@ SQLITE_API void sqlite3_str_vappendf( | |||
| 32971 | 32971 | ||
| 32972 | 32972 | szBufNeeded = MAX(e2,0)+(i64)precision+(i64)width+10; | |
| 32973 | 32973 | if( cThousand && e2>0 ) szBufNeeded += (e2+2)/3; | |
| 32974 | - if( sqlite3StrAccumEnlargeIfNeeded(pAccum, szBufNeeded) ){ | ||
| 32975 | - width = length = 0; | ||
| 32976 | - break; | ||
| 32974 | + if( szBufNeeded + pAccum->nChar >= pAccum->nAlloc ){ | ||
| 32975 | + if( pAccum->mxAlloc==0 && pAccum->accError==0 ){ | ||
| 32976 | + /* Unable to allocate space in pAccum, perhaps because it | ||
| 32977 | + ** is coming from sqlite3_snprintf() or similar. We'll have | ||
| 32978 | + ** to render into temporary space and the memcpy() it over. */ | ||
| 32979 | + bufpt = sqlite3_malloc(szBufNeeded); | ||
| 32980 | + if( bufpt==0 ){ | ||
| 32981 | + sqlite3StrAccumSetError(pAccum, SQLITE_NOMEM); | ||
| 32982 | + return; | ||
| 32983 | + } | ||
| 32984 | + zExtra = bufpt; | ||
| 32985 | + }else if( sqlite3StrAccumEnlarge(pAccum, szBufNeeded)<szBufNeeded ){ | ||
| 32986 | + width = length = 0; | ||
| 32987 | + break; | ||
| 32988 | + }else{ | ||
| 32989 | + bufpt = pAccum->zText + pAccum->nChar; | ||
| 32990 | + } | ||
| 32991 | + }else{ | ||
| 32992 | + bufpt = pAccum->zText + pAccum->nChar; | ||
| 32977 | 32993 | } | |
| 32978 | - bufpt = zOut = pAccum->zText + pAccum->nChar; | ||
| 32994 | + zOut = bufpt; | ||
| 32979 | 32995 | ||
| 32980 | 32996 | flag_dp = (precision>0 ?1:0) | flag_alternateform | flag_altform2; | |
| 32981 | 32997 | /* The sign in front of the number */ | |
@@ -33076,14 +33092,22 @@ SQLITE_API void sqlite3_str_vappendf( | |||
| 33076 | 33092 | } | |
| 33077 | 33093 | length = width; | |
| 33078 | 33094 | } | |
| 33079 | - pAccum->nChar += length; | ||
| 33080 | - zOut[length] = 0; | ||
| 33081 | 33095 | ||
| 33082 | - /* Floating point conversions render directly into the output | ||
| 33083 | - ** buffer. Hence, don't just break out of the switch(). Bypass the | ||
| 33084 | - ** output buffer writing that occurs after the switch() by continuing | ||
| 33085 | - ** to the next character in the format string. */ | ||
| 33086 | - continue; | ||
| 33096 | + if( zExtra==0 ){ | ||
| 33097 | + /* The result is being rendered directory into pAccum. This | ||
| 33098 | + ** is the command and fast case */ | ||
| 33099 | + pAccum->nChar += length; | ||
| 33100 | + zOut[length] = 0; | ||
| 33101 | + continue; | ||
| 33102 | + }else{ | ||
| 33103 | + /* We were unable to render directly into pAccum because we | ||
| 33104 | + ** couldn't allocate sufficient memory. We need to memcpy() | ||
| 33105 | + ** the rendering (or some prefix thereof) into the output | ||
| 33106 | + ** buffer. */ | ||
| 33107 | + bufpt[0] = 0; | ||
| 33108 | + bufpt = zExtra; | ||
| 33109 | + break; | ||
| 33110 | + } | ||
| 33087 | 33111 | } | |
| 33088 | 33112 | case etSIZE: | |
| 33089 | 33113 | if( !bArgList ){ | |
@@ -33130,7 +33154,7 @@ SQLITE_API void sqlite3_str_vappendf( | |||
| 33130 | 33154 | if( sqlite3StrAccumEnlargeIfNeeded(pAccum, nCopyBytes) ){ | |
| 33131 | 33155 | break; | |
| 33132 | 33156 | } | |
| 33133 | - sqlite3_str_append(pAccum, | ||
| 33157 | + sqlite3_str_append(pAccum, | ||
| 33134 | 33158 | &pAccum->zText[pAccum->nChar-nCopyBytes], nCopyBytes); | |
| 33135 | 33159 | precision -= nPrior; | |
| 33136 | 33160 | nPrior *= 2; | |
@@ -33646,7 +33670,7 @@ SQLITE_API void sqlite3_str_reset(StrAccum *p){ | |||
| 33646 | 33670 | ** of its content, all in one call. | |
| 33647 | 33671 | */ | |
| 33648 | 33672 | SQLITE_API void sqlite3_str_free(sqlite3_str *p){ | |
| 33649 | - if( p ){ | ||
| 33673 | + if( p!=0 && p!=&sqlite3OomStr ){ | ||
| 33650 | 33674 | sqlite3_str_reset(p); | |
| 33651 | 33675 | sqlite3_free(p); | |
| 33652 | 33676 | } | |
@@ -36792,15 +36816,20 @@ SQLITE_PRIVATE u8 sqlite3StrIHash(const char *z){ | |||
| 36792 | 36816 | return h; | |
| 36793 | 36817 | } | |
| 36794 | 36818 | ||
| 36819 | + #if !defined(SQLITE_DISABLE_INTRINSIC) \ | ||
| 36820 | + && (defined(__GNUC__) || defined(__clang__)) \ | ||
| 36821 | + && (defined(__x86_64__) || defined(__aarch64__) || \ | ||
| 36822 | + (defined(__riscv) && defined(__riscv_xlen) && (__riscv_xlen>32))) | ||
| 36823 | + #define SQLITE_USE_UINT128 | ||
| 36824 | + #endif | ||
| 36825 | + | ||
| 36795 | 36826 | /* | |
| 36796 | 36827 | ** Two inputs are multiplied to get a 128-bit result. Write the | |
| 36797 | 36828 | ** lower 64-bits of the result into *pLo, and return the high-order | |
| 36798 | 36829 | ** 64 bits. | |
| 36799 | 36830 | */ | |
| 36800 | 36831 | static u64 sqlite3Multiply128(u64 a, u64 b, u64 *pLo){ | |
| 36801 | - #if (defined(__GNUC__) || defined(__clang__)) \ | ||
| 36802 | - && (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) \ | ||
| 36803 | - && !defined(SQLITE_DISABLE_INTRINSIC) | ||
| 36832 | + #if defined(SQLITE_USE_UINT128) | ||
| 36804 | 36833 | __uint128_t r = (__uint128_t)a * b; | |
| 36805 | 36834 | *pLo = (u64)r; | |
| 36806 | 36835 | return (u64)(r>>64); | |
@@ -36834,9 +36863,7 @@ static u64 sqlite3Multiply128(u64 a, u64 b, u64 *pLo){ | |||
| 36834 | 36863 | ** The lower 64 bits of A*B are discarded. | |
| 36835 | 36864 | */ | |
| 36836 | 36865 | static u64 sqlite3Multiply160(u64 a, u32 aLo, u64 b, u32 *pLo){ | |
| 36837 | - #if (defined(__GNUC__) || defined(__clang__)) \ | ||
| 36838 | - && (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) \ | ||
| 36839 | - && !defined(SQLITE_DISABLE_INTRINSIC) | ||
| 36866 | + #if defined(SQLITE_USE_UINT128) | ||
| 36840 | 36867 | __uint128_t r = (__uint128_t)a * b; | |
| 36841 | 36868 | r += ((__uint128_t)aLo * b) >> 32; | |
| 36842 | 36869 | *pLo = (r>>32)&0xffffffff; | |
@@ -36874,6 +36901,8 @@ static u64 sqlite3Multiply160(u64 a, u32 aLo, u64 b, u32 *pLo){ | |||
| 36874 | 36901 | #endif | |
| 36875 | 36902 | } | |
| 36876 | 36903 | ||
| 36904 | + #undef SQLITE_USE_UINT128 | ||
| 36905 | + | ||
| 36877 | 36906 | /* | |
| 36878 | 36907 | ** Return a u64 with the N-th bit set. | |
| 36879 | 36908 | */ | |
@@ -56108,10 +56137,10 @@ SQLITE_API int sqlite3_deserialize( | |||
| 56108 | 56137 | if( rc ) goto end_deserialize; | |
| 56109 | 56138 | db->init.iDb = (u8)iDb; | |
| 56110 | 56139 | db->init.reopenMemdb = 1; | |
| 56111 | - rc = sqlite3_step(pStmt); | ||
| 56140 | + sqlite3_step(pStmt); | ||
| 56112 | 56141 | db->init.reopenMemdb = 0; | |
| 56113 | - if( rc!=SQLITE_DONE ){ | ||
| 56114 | - rc = SQLITE_ERROR; | ||
| 56142 | + rc = sqlite3_finalize(pStmt); | ||
| 56143 | + if( rc!=SQLITE_OK ){ | ||
| 56115 | 56144 | goto end_deserialize; | |
| 56116 | 56145 | } | |
| 56117 | 56146 | p = memdbFromDbSchema(db, zSchema); | |
@@ -56132,7 +56161,6 @@ SQLITE_API int sqlite3_deserialize( | |||
| 56132 | 56161 | } | |
| 56133 | 56162 | ||
| 56134 | 56163 | end_deserialize: | |
| 56135 | - sqlite3_finalize(pStmt); | ||
| 56136 | 56164 | if( pData && (mFlags & SQLITE_DESERIALIZE_FREEONCLOSE)!=0 ){ | |
| 56137 | 56165 | sqlite3_free(pData); | |
| 56138 | 56166 | } | |
@@ -123122,7 +123150,9 @@ SQLITE_PRIVATE void sqlite3AlterDropConstraint( | |||
| 123122 | 123150 | if( !pTab ) return; | |
| 123123 | 123151 | ||
| 123124 | 123152 | if( pCons ){ | |
| 123125 | - zArg = sqlite3MPrintf(db, "%.*Q", pCons->n, pCons->z); | ||
| 123153 | + char *z = sqlite3NameFromToken(db, pCons); | ||
| 123154 | + zArg = sqlite3MPrintf(db, "%Q", z); | ||
| 123155 | + sqlite3DbFree(db, z); | ||
| 123126 | 123156 | }else{ | |
| 123127 | 123157 | int iCol; | |
| 123128 | 123158 | if( alterFindCol(pParse, pTab, pCol, &iCol) ) return; | |
@@ -125504,6 +125534,16 @@ static void attachFunc( | |||
| 125504 | 125534 | ** from sqlite3_deserialize() to close database db->init.iDb and | |
| 125505 | 125535 | ** reopen it as a MemDB */ | |
| 125506 | 125536 | Btree *pNewBt = 0; | |
| 125537 | + | ||
| 125538 | + pNew = &db->aDb[db->init.iDb]; | ||
| 125539 | + assert( pNew->pBt!=0 ); | ||
| 125540 | + if( sqlite3BtreeTxnState(pNew->pBt)!=SQLITE_TXN_NONE | ||
| 125541 | + || sqlite3BtreeIsInBackup(pNew->pBt) | ||
| 125542 | + ){ | ||
| 125543 | + rc = SQLITE_BUSY; | ||
| 125544 | + goto attach_error; | ||
| 125545 | + } | ||
| 125546 | + | ||
| 125507 | 125547 | pVfs = sqlite3_vfs_find("memdb"); | |
| 125508 | 125548 | if( pVfs==0 ) return; | |
| 125509 | 125549 | rc = sqlite3BtreeOpen(pVfs, "x\0", db, &pNewBt, 0, SQLITE_OPEN_MAIN_DB); | |
@@ -125513,8 +125553,7 @@ static void attachFunc( | |||
| 125513 | 125553 | /* Both the Btree and the new Schema were allocated successfully. | |
| 125514 | 125554 | ** Close the old db and update the aDb[] slot with the new memdb | |
| 125515 | 125555 | ** values. */ | |
| 125516 | - pNew = &db->aDb[db->init.iDb]; | ||
| 125517 | - if( ALWAYS(pNew->pBt) ) sqlite3BtreeClose(pNew->pBt); | ||
| 125556 | + sqlite3BtreeClose(pNew->pBt); | ||
| 125518 | 125557 | pNew->pBt = pNewBt; | |
| 125519 | 125558 | pNew->pSchema = pNewSchema; | |
| 125520 | 125559 | }else{ | |
@@ -156057,6 +156096,7 @@ static SQLITE_NOINLINE void existsToJoin( | |||
| 156057 | 156096 | && !ExprHasProperty(pWhere, EP_OuterON|EP_InnerON) | |
| 156058 | 156097 | && ALWAYS(p->pSrc!=0) | |
| 156059 | 156098 | && p->pSrc->nSrc<BMS | |
| 156099 | + && (p->pLimit==0 || p->pLimit->pRight==0) | ||
| 156060 | 156100 | ){ | |
| 156061 | 156101 | if( pWhere->op==TK_AND ){ | |
| 156062 | 156102 | Expr *pRight = pWhere->pRight; | |
@@ -156104,7 +156144,6 @@ static SQLITE_NOINLINE void existsToJoin( | |||
| 156104 | 156144 | sqlite3TreeViewSelect(0, p, 0); | |
| 156105 | 156145 | } | |
| 156106 | 156146 | #endif | |
| 156107 | - existsToJoin(pParse, p, pSubWhere); | ||
| 156108 | 156147 | } | |
| 156109 | 156148 | } | |
| 156110 | 156149 | } | |
@@ -165946,7 +165985,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( | |||
| 165946 | 165985 | ** by this loop in the a[0] slot and all notReady tables in a[1..] slots. | |
| 165947 | 165986 | ** This becomes the SrcList in the recursive call to sqlite3WhereBegin(). | |
| 165948 | 165987 | */ | |
| 165949 | - if( pWInfo->nLevel>1 ){ | ||
| 165988 | + if( pWInfo->nLevel>1 || pTabItem->fg.fromExists ){ | ||
| 165950 | 165989 | int nNotReady; /* The number of notReady tables */ | |
| 165951 | 165990 | SrcItem *origSrc; /* Original list of tables */ | |
| 165952 | 165991 | nNotReady = pWInfo->nLevel - iLevel - 1; | |
@@ -165959,6 +165998,13 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( | |||
| 165959 | 165998 | for(k=1; k<=nNotReady; k++){ | |
| 165960 | 165999 | memcpy(&pOrTab->a[k], &origSrc[pLevel[k].iFrom], sizeof(pOrTab->a[k])); | |
| 165961 | 166000 | } | |
| 166001 | + | ||
| 166002 | + /* Clear the fromExists flag on the OR-optimized table entry so that | ||
| 166003 | + ** the calls to sqlite3WhereEnd() do not code early-exits after the | ||
| 166004 | + ** first row is visited. The early exit applies to this table's | ||
| 166005 | + ** overall loop - including the multiple OR branches and any WHERE | ||
| 166006 | + ** conditions not passed to the sub-loops - not to the sub-loops. */ | ||
| 166007 | + pOrTab->a[0].fg.fromExists = 0; | ||
| 165962 | 166008 | }else{ | |
| 165963 | 166009 | pOrTab = pWInfo->pTabList; | |
| 165964 | 166010 | } | |
@@ -166202,7 +166248,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( | |||
| 166202 | 166248 | assert( pLevel->op==OP_Return ); | |
| 166203 | 166249 | pLevel->p2 = sqlite3VdbeCurrentAddr(v); | |
| 166204 | 166250 | ||
| 166205 | - if( pWInfo->nLevel>1 ){ sqlite3DbFreeNN(db, pOrTab); } | ||
| 166251 | + if( pWInfo->pTabList!=pOrTab ){ sqlite3DbFreeNN(db, pOrTab); } | ||
| 166206 | 166252 | if( !untestedTerms ) disableTerm(pLevel, pTerm); | |
| 166207 | 166253 | }else | |
| 166208 | 166254 | #endif /* SQLITE_OMIT_OR_OPTIMIZATION */ | |
@@ -176127,27 +176173,11 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){ | |||
| 176127 | 176173 | } | |
| 176128 | 176174 | #endif /* SQLITE_DISABLE_SKIPAHEAD_DISTINCT */ | |
| 176129 | 176175 | } | |
| 176130 | - if( pTabList->a[pLevel->iFrom].fg.fromExists | ||
| 176131 | - && (i==pWInfo->nLevel-1 | ||
| 176132 | - || pTabList->a[pWInfo->a[i+1].iFrom].fg.fromExists==0) | ||
| 176133 | - ){ | ||
| 176134 | - /* This is an EXISTS-to-JOIN optimization which is either the | ||
| 176135 | - ** inner-most loop, or the inner-most of a group of nested | ||
| 176136 | - ** EXISTS-to-JOIN optimization loops. If this loop sees a successful | ||
| 176137 | - ** row, it should break out of itself as well as other EXISTS-to-JOIN | ||
| 176138 | - ** loops in which is is directly nested. */ | ||
| 176139 | - int nOuter = 0; /* Nr of outer EXISTS that this one is nested within */ | ||
| 176140 | - while( nOuter<i ){ | ||
| 176141 | - if( !pTabList->a[pLevel[-nOuter-1].iFrom].fg.fromExists ) break; | ||
| 176142 | - nOuter++; | ||
| 176143 | - } | ||
| 176144 | - testcase( nOuter>0 ); | ||
| 176145 | - sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel[-nOuter].addrBrk); | ||
| 176146 | - if( nOuter ){ | ||
| 176147 | - VdbeComment((v, "EXISTS break %d..%d", i-nOuter, i)); | ||
| 176148 | - }else{ | ||
| 176149 | - VdbeComment((v, "EXISTS break %d", i)); | ||
| 176150 | - } | ||
| 176176 | + if( pTabList->a[pLevel->iFrom].fg.fromExists ){ | ||
| 176177 | + /* This is an EXISTS-to-JOIN optimization loop. If this loop sees a | ||
| 176178 | + ** successful row, it should break out of itself. */ | ||
| 176179 | + sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrBrk); | ||
| 176180 | + VdbeComment((v, "EXISTS break %d", i)); | ||
| 176151 | 176181 | } | |
| 176152 | 176182 | sqlite3VdbeResolveLabel(v, pLevel->addrCont); | |
| 176153 | 176183 | if( pLevel->op!=OP_Noop ){ | |
@@ -184334,6 +184364,7 @@ static YYACTIONTYPE yy_reduce( | |||
| 184334 | 184364 | yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy454, 0); | |
| 184335 | 184365 | if( yymsp[-4].minor.yy454 ){ | |
| 184336 | 184366 | yymsp[-4].minor.yy454->x.pList = pList; | |
| 184367 | + sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy454); | ||
| 184337 | 184368 | }else{ | |
| 184338 | 184369 | sqlite3ExprListDelete(pParse->db, pList); | |
| 184339 | 184370 | } | |
@@ -233951,10 +233982,11 @@ static int sessionSerialLen(const u8 *a){ | |||
| 233951 | 233982 | int n; | |
| 233952 | 233983 | assert( a!=0 ); | |
| 233953 | 233984 | e = *a; | |
| 233954 | - if( e==0 || e==0xFF ) return 1; | ||
| 233955 | - if( e==SQLITE_NULL ) return 1; | ||
| 233956 | 233985 | if( e==SQLITE_INTEGER || e==SQLITE_FLOAT ) return 9; | |
| 233957 | - return sessionVarintGet(&a[1], &n) + 1 + n; | ||
| 233986 | + if( e==SQLITE_TEXT || e==SQLITE_BLOB ){ | ||
| 233987 | + return sessionVarintGet(&a[1], &n) + 1 + n; | ||
| 233988 | + } | ||
| 233989 | + return 1; | ||
| 233958 | 233990 | } | |
| 233959 | 233991 | ||
| 233960 | 233992 | /* | |
@@ -233977,17 +234009,17 @@ static unsigned int sessionChangeHash( | |||
| 233977 | 234009 | u8 *a = aRecord; /* Used to iterate through change record */ | |
| 233978 | 234010 | ||
| 233979 | 234011 | for(i=0; i<pTab->nCol; i++){ | |
| 233980 | - int eType = *a; | ||
| 233981 | 234012 | int isPK = pTab->abPK[i]; | |
| 233982 | 234013 | if( bPkOnly && isPK==0 ) continue; | |
| 233983 | 234014 | ||
| 233984 | - assert( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT | ||
| 233985 | - || eType==SQLITE_TEXT || eType==SQLITE_BLOB | ||
| 233986 | - || eType==SQLITE_NULL || eType==0 | ||
| 233987 | - ); | ||
| 233988 | - | ||
| 233989 | 234015 | if( isPK ){ | |
| 233990 | - a++; | ||
| 234016 | + int eType = *a++; | ||
| 234017 | + | ||
| 234018 | + assert( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT | ||
| 234019 | + || eType==SQLITE_TEXT || eType==SQLITE_BLOB | ||
| 234020 | + || eType==SQLITE_NULL || eType==0 | ||
| 234021 | + ); | ||
| 234022 | + | ||
| 233991 | 234023 | h = sessionHashAppendType(h, eType); | |
| 233992 | 234024 | if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ | |
| 233993 | 234025 | h = sessionHashAppendI64(h, sessionGetI64(a)); | |
@@ -237015,9 +237047,11 @@ static int sessionChangesetBufferRecord( | |||
| 237015 | 237047 | rc = sessionInputBuffer(pIn, nByte); | |
| 237016 | 237048 | }else if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ | |
| 237017 | 237049 | nByte += 8; | |
| 237050 | + }else if( eType!=0 && eType!=SQLITE_NULL ){ | ||
| 237051 | + rc = SQLITE_CORRUPT_BKPT; | ||
| 237018 | 237052 | } | |
| 237019 | 237053 | } | |
| 237020 | - if( (pIn->iNext+nByte)>pIn->nData ){ | ||
| 237054 | + if( rc==SQLITE_OK && (pIn->iNext+nByte)>pIn->nData ){ | ||
| 237021 | 237055 | rc = SQLITE_CORRUPT_BKPT; | |
| 237022 | 237056 | } | |
| 237023 | 237057 | } | |
@@ -263222,7 +263256,7 @@ static void fts5SourceIdFunc( | |||
| 263222 | 263256 | ){ | |
| 263223 | 263257 | assert( nArg==0 ); | |
| 263224 | 263258 | UNUSED_PARAM2(nArg, apUnused); | |
| 263225 | - sqlite3_result_text(pCtx, "fts5: 2026-04-09 11:41:38 4525003a53a7fc63ca75c59b22c79608659ca12f0131f52c18637f829977f20b", -1, SQLITE_TRANSIENT); | ||
| 263259 | + sqlite3_result_text(pCtx, "fts5: 2026-05-05 10:34:17 c88b22011a54b4f6fbd149e9f8e4de77658ce58143a1af0e3785e4e6475127e9", -1, SQLITE_TRANSIENT); | ||
| 263226 | 263260 | } | |
| 263227 | 263261 | ||
| 263228 | 263262 | /* | |
| 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.53.0" | ||
| 150 | - #define SQLITE_VERSION_NUMBER 3053000 | ||
| 151 | - #define SQLITE_SOURCE_ID "2026-04-09 11:41:38 4525003a53a7fc63ca75c59b22c79608659ca12f0131f52c18637f829977f20b" | ||
| 152 | - #define SQLITE_SCM_BRANCH "trunk" | ||
| 153 | - #define SQLITE_SCM_TAGS "release major-release version-3.53.0" | ||
| 154 | - #define SQLITE_SCM_DATETIME "2026-04-09T11:41:38.498Z" | ||
| 149 | + #define SQLITE_VERSION "3.53.1" | ||
| 150 | + #define SQLITE_VERSION_NUMBER 3053001 | ||
| 151 | + #define SQLITE_SOURCE_ID "2026-05-05 10:34:17 c88b22011a54b4f6fbd149e9f8e4de77658ce58143a1af0e3785e4e6475127e9" | ||
| 152 | + #define SQLITE_SCM_BRANCH "branch-3.53" | ||
| 153 | + #define SQLITE_SCM_TAGS "release version-3.53.1" | ||
| 154 | + #define SQLITE_SCM_DATETIME "2026-05-05T10:34:17.344Z" | ||
| 155 | 155 | ||
| 156 | 156 | /* | |
| 157 | 157 | ** CAPI3REF: Run-Time Library Version Numbers | |
| Back | FazBrowse Home | New Git URL |
0 commit comments