1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Enhance the use of the column cache for UPDATE statements, making them

more efficient for the case where a column is modified to be an expression
of other unmodified columns.

FossilOrigin-Name: 871e091df651b2275a672c35ff938bd4b6db0d7f
This commit is contained in:
drh
2015-10-15 19:21:51 +00:00
parent fed7ac6f04
commit ce78bc6e7e
7 changed files with 34 additions and 28 deletions

View File

@@ -1305,11 +1305,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
r = sqlite3GetTempRange(pParse, nPk);
for(iPk=0; iPk<nPk; iPk++){
int iCol = pPk->aiColumn[iPk];
int rx;
rx = sqlite3ExprCodeGetColumn(pParse, pTab, iCol, iCur,r+iPk,0);
if( rx!=r+iPk ){
sqlite3VdbeAddOp2(v, OP_SCopy, rx, r+iPk);
}
sqlite3ExprCodeGetColumnToReg(pParse, pTab, iCol, iCur, r+iPk);
}
/* Check if the temp table already contains this key. If so,