aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-04-26 18:13:11 +0000
committerdan <Dan Kennedy>2024-04-26 18:13:11 +0000
commit4c3ab545a91d50fd13e711dc250cce6927407ca2 (patch)
tree4354600475e2b8de6720fc25f35103c169067fd2 /src
parent297472a2fcae79eb2e531d8c93fdb7f36725afdb (diff)
downloadsqlite-4c3ab545a91d50fd13e711dc250cce6927407ca2.tar.gz
sqlite-4c3ab545a91d50fd13e711dc250cce6927407ca2.zip
Allow virtual table implementations to handle OFFSET but not LIMIT, but not LIMIT but not OFFSET.
FossilOrigin-Name: 90e5c8226a695e838e8c1703a9b8598e654d216799e8806c4d1a1f20c28c6486
Diffstat (limited to 'src')
-rw-r--r--src/whereexpr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/whereexpr.c b/src/whereexpr.c
index d25bce5f0..5465dc953 100644
--- a/src/whereexpr.c
+++ b/src/whereexpr.c
@@ -1653,14 +1653,14 @@ void SQLITE_NOINLINE sqlite3WhereAddLimit(WhereClause *pWC, Select *p){
/* All conditions are met. Add the terms to the where-clause object. */
assert( p->pLimit->op==TK_LIMIT );
- if( p->iOffset==0 || (p->selFlags & SF_Compound)==0 ){
- whereAddLimitExpr(pWC, p->iLimit, p->pLimit->pLeft,
- iCsr, SQLITE_INDEX_CONSTRAINT_LIMIT);
- }
if( p->iOffset!=0 && (p->selFlags & SF_Compound)==0 ){
whereAddLimitExpr(pWC, p->iOffset, p->pLimit->pRight,
iCsr, SQLITE_INDEX_CONSTRAINT_OFFSET);
}
+ if( p->iOffset==0 || (p->selFlags & SF_Compound)==0 ){
+ whereAddLimitExpr(pWC, p->iLimit, p->pLimit->pLeft,
+ iCsr, SQLITE_INDEX_CONSTRAINT_LIMIT);
+ }
}
}