aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2022-05-13 19:50:29 +0000
committerdrh <>2022-05-13 19:50:29 +0000
commitf69dad8c53c70002c5b2b9755bb89f4051f15eae (patch)
tree510e9625201cabe8c89d4c2509e0beba846a55a7 /src/expr.c
parent767bc8de8e3859777eab42a32e034ef807759f8a (diff)
downloadsqlite-f69dad8c53c70002c5b2b9755bb89f4051f15eae.tar.gz
sqlite-f69dad8c53c70002c5b2b9755bb89f4051f15eae.zip
Walk back the optimization from check-in [cc458317bd77046c] that tries to
reuse the same ephemeral cursor of a list subquery when that subquery is reused, as it does not work in cases where the list subquery is used both for lookups and for scans. FossilOrigin-Name: 12ee29d632ae4b585ef6bc07d3289d00c121268945dffd5673b251d95874e3f8
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/expr.c b/src/expr.c
index 64c065168..b7e6c25fa 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -2746,11 +2746,7 @@ int sqlite3FindInIndex(
assert( pX->op==TK_IN );
mustBeUnique = (inFlags & IN_INDEX_LOOP)!=0;
- if( pX->iTable && (inFlags & IN_INDEX_REUSE_CUR)!=0 ){
- iTab = pX->iTable;
- }else{
- iTab = pParse->nTab++;
- }
+ iTab = pParse->nTab++;
/* If the RHS of this IN(...) operator is a SELECT, and if it matters
** whether or not the SELECT result contains NULL values, check whether