diff options
author | drh <> | 2021-01-27 20:35:22 +0000 |
---|---|---|
committer | drh <> | 2021-01-27 20:35:22 +0000 |
commit | 55d4c84b61488fcfcd5df645bba6dde41eeb308e (patch) | |
tree | 4c02394b30b8de02eb172c1d3e9c8b2c5a3701d1 /src/wherecode.c | |
parent | 2053f313bfc498262f13c04793b93867f58544ba (diff) | |
parent | 16cd8b96d3e2cb80e169beee529307d0f0fdf51c (diff) | |
download | sqlite-55d4c84b61488fcfcd5df645bba6dde41eeb308e.tar.gz sqlite-55d4c84b61488fcfcd5df645bba6dde41eeb308e.zip |
Merge recent enhancements from trunk.
FossilOrigin-Name: 5fbcb208d24d45169fc53ad8738dd3545d9bbd26b7434e31afc7f6419cd4e958
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 4afe0ac9c..17dc36152 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -1743,6 +1743,12 @@ Bitmask sqlite3WhereCodeOneLoopStart( SWAP(u8, nBtm, nTop); } + if( iLevel>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)!=0 ){ + /* In case OP_SeekScan is used, ensure that the index cursor does not + ** point to a valid row for the first iteration of this loop. */ + sqlite3VdbeAddOp1(v, OP_NullRow, iIdxCur); + } + /* Generate code to evaluate all constraint terms using == or IN ** and store the values of those terms in an array of registers ** starting at regBase. |