aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-04-26 14:32:58 +0000
committerdan <Dan Kennedy>2024-04-26 14:32:58 +0000
commit3afd5b6d6565902271c09d6fa487e68fef3e92a4 (patch)
treedbfcfaea4d536e58ad46a2d53f88ad12033c522f /src
parent99ac2324aa7f52713d4a14b29e0dde6f2c9479aa (diff)
downloadsqlite-3afd5b6d6565902271c09d6fa487e68fef3e92a4.tar.gz
sqlite-3afd5b6d6565902271c09d6fa487e68fef3e92a4.zip
Fix a problem allowing a LIMIT constraint to be passed to a virtual table in cases where there exist WHERE terms that cannot also be passed.
FossilOrigin-Name: 72c8ed9698dd2aadee7b84fd293e8306233f0fe5b5b5731687482444fdf461c7
Diffstat (limited to 'src')
-rw-r--r--src/whereexpr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/whereexpr.c b/src/whereexpr.c
index ff6f753b5..d25bce5f0 100644
--- a/src/whereexpr.c
+++ b/src/whereexpr.c
@@ -1638,6 +1638,7 @@ void SQLITE_NOINLINE sqlite3WhereAddLimit(WhereClause *pWC, Select *p){
continue;
}
if( pWC->a[ii].leftCursor!=iCsr ) return;
+ if( pWC->a[ii].prereqRight!=0 ) return;
}
/* Check condition (5). Return early if it is not met. */