mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-26 09:41:10 +03:00
Avoid redundant table b-tree cursor seeks in UPDATE statements that use the
two-pass strategy. FossilOrigin-Name: dc555b1039c6930f6d15355c698ff917a85e8056
This commit is contained in:
@ -1591,7 +1591,10 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
if( omitTable ){
|
||||
/* pIdx is a covering index. No need to access the main table. */
|
||||
}else if( HasRowid(pIdx->pTable) ){
|
||||
if( (pWInfo->wctrlFlags & WHERE_SEEK_TABLE)!=0 ){
|
||||
if( (pWInfo->wctrlFlags & WHERE_SEEK_TABLE) || (
|
||||
(pWInfo->wctrlFlags & WHERE_SEEK_UNIQ_TABLE)
|
||||
&& (pWInfo->eOnePass==ONEPASS_SINGLE)
|
||||
)){
|
||||
iRowidReg = ++pParse->nMem;
|
||||
sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, iRowidReg);
|
||||
sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
|
||||
|
Reference in New Issue
Block a user