1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Additional corner-case fixes for the in-scan-vs-index or OP_SeekScan

optimization.

FossilOrigin-Name: ad5ab24ebd557e7af1d92ab3fbcb3747c04da5ad4ed779fb6391dc94042687dd
This commit is contained in:
drh
2020-10-02 13:48:57 +00:00
parent 64208b50ce
commit 7d14ffe4e1
4 changed files with 12 additions and 16 deletions

View File

@@ -1809,12 +1809,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev];
assert( op!=0 );
assert( op==OP_SeekGE
|| (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0
|| (db->flags & SQLITE_ReverseOrder)!=0 );
if( (pLoop->wsFlags & WHERE_IN_SEEKSCAN)!=0
&& op==OP_SeekGE /* OP_SeekScan only does forward scans */
){
if( (pLoop->wsFlags & WHERE_IN_SEEKSCAN)!=0 && op==OP_SeekGE ){
assert( regBignull==0 );
/* TUNING: The OP_SeekScan opcode seeks to reduce the number
** of expensive seek operations by replacing a single seek with