-C Add\sbit\sto\ssqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS)\sthat\swill\ndisable\sthe\sone-pass\soptimizating\sin\sDELETE\sand\sUPDATE.
-D 2023-07-31T17:39:36.821
+C The\soriginal\scolumn-cache\simplementation\sfrom\scheck-in\s[ab1edcc7fedcf279]\n(merged\sto\strunk\sat\s[771fe35074b50b8d])\sis\sunsound.\s\sThis\scheck-in\sfixes\nthe\sissue.\s\sHad\sto\sgive\sback\sa\slittle\sperformance,\sthe\soptimization\sis\sstill\na\soverall\swin.
+D 2023-07-31T20:02:11.619
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
F src/util.c c2aa170f2eb429235b1dddce8952770787ffa5124dc89d405bfbe8ebad8e7ebd
F src/vacuum.c 604fcdaebe76f3497c855afcbf91b8fa5046b32de3045bab89cc008d68e40104
-F src/vdbe.c cd0396758da6a95e6c4e3bec7c3d6e767c3b39930c295c2425f83bb086cdc6ba
+F src/vdbe.c 49b0c386511cb0261dc92e3583b0d08c5c450ab404f0e139378d10661a19aa5f
F src/vdbe.h 41485521f68e9437fdb7ec4a90f9d86ab294e9bb8281e33b235915e29122cfc0
-F src/vdbeInt.h cd829ff67fc18aff2476fe3209262ba8671cb43d51cb6913de4a670e37d2fbe3
+F src/vdbeInt.h 949669dfd8a41550d27dcb905b494f2ccde9a2e6c1b0b04daa1227e2e74c2b2c
F src/vdbeapi.c f37822f215740ede2a8fcae99bc13f2cc3a72dd0e1d22b81b9298c5ca67dbc38
F src/vdbeaux.c a586f445945eef6ad1fcd7c94f700faa1baea93c0dbd446291c7cf65966c8470
F src/vdbeblob.c 2516697b3ee8154eb8915f29466fb5d4f1ae39ee8b755ea909cefaf57ec5e2ce
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 4a8a17498ecaccca5e5aab65d4596cbca9799547f50683237d08c1fa3556f1cf
-R ef0070662a249066ae6d16c0760a2f90
+P 22f6dd5cd32ed9e7b932fdba98aa8652fde999df79f4995d3d8ac1acf430cf53
+R 15ab2c7da6a67c12e2ba41a7336b6a4c
U drh
-Z 540a4a2640cda7628ceedc92fe19bc74
+Z 46639d6bc060420caa2ca32405ae95c8
# Remove this line to create a well-formed Fossil manifest.
int iCol, /* The column to read */
int t, /* The serial-type code for the column value */
i64 iOffset, /* Offset to the start of the content value */
+ u32 cacheStatus, /* Current Vdbe.cacheCtr value */
+ u32 colCacheCtr, /* Current value of the column cache counter */
Mem *pDest /* Store the value into this register. */
){
int rc;
pCache = pC->pCache;
if( pCache->pCValue==0
|| pCache->iCol!=iCol
+ || pCache->cacheStatus!=cacheStatus
+ || pCache->colCacheCtr!=colCacheCtr
|| pCache->iOffset!=sqlite3BtreeOffset(pC->uc.pCursor)
){
if( pCache->pCValue ) sqlite3RCStrUnref(pCache->pCValue);
pBuf[len+1] = 0;
pBuf[len+2] = 0;
pCache->iCol = iCol;
+ pCache->cacheStatus = cacheStatus;
+ pCache->colCacheCtr = colCacheCtr;
pCache->iOffset = sqlite3BtreeOffset(pC->uc.pCursor);
}else{
pBuf = pCache->pCValue;
Mem *pIn2 = 0; /* 2nd input operand */
Mem *pIn3 = 0; /* 3rd input operand */
Mem *pOut = 0; /* Output operand */
+ u32 colCacheCtr = 0; /* Column cache counter */
#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE)
u64 *pnCycle = 0;
int bStmtScanStatus = IS_STMT_SCANSTATUS(db)!=0;
*/
sqlite3VdbeSerialGet((u8*)sqlite3CtypeMap, t, pDest);
}else{
- rc = vdbeColumnFromOverflow(pC, p2, t, aOffset[p2], pDest);
+ rc = vdbeColumnFromOverflow(pC, p2, t, aOffset[p2],
+ p->cacheCtr, colCacheCtr, pDest);
if( rc ){
if( rc==SQLITE_NOMEM ) goto no_mem;
if( rc==SQLITE_TOOBIG ) goto too_big;
);
pC->deferredMoveto = 0;
pC->cacheStatus = CACHE_STALE;
+ colCacheCtr++;
/* Invoke the update-hook if required. */
if( rc ) goto abort_due_to_error;
rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5);
pC->cacheStatus = CACHE_STALE;
+ colCacheCtr++;
pC->seekResult = 0;
if( rc ) goto abort_due_to_error;
);
assert( pC->deferredMoveto==0 );
pC->cacheStatus = CACHE_STALE;
+ colCacheCtr++;
if( rc) goto abort_due_to_error;
break;
}
assert( pC->deferredMoveto==0 );
pC->cacheStatus = CACHE_STALE;
pC->seekResult = 0;
+ colCacheCtr++;
break;
}