aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-03-21 20:08:13 +0000
committerdrh <>2022-03-21 20:08:13 +0000
commita753a3a2be4a1008bfc7246781d3c32c0695d58d (patch)
tree28ad77079c488282df0263cd5f9db9d4b68b8ab6 /src
parentc63e40956b346035aca581378572dbbf7834c3ab (diff)
downloadsqlite-a753a3a2be4a1008bfc7246781d3c32c0695d58d.tar.gz
sqlite-a753a3a2be4a1008bfc7246781d3c32c0695d58d.zip
Do not allow an #ifdef inside of an assert(), as gcc tells us that is
not portable. FossilOrigin-Name: c7a2047e93df36c172be0be773f9a04150dafe7ba1773269d74016418d262fc4
Diffstat (limited to 'src')
-rw-r--r--src/where.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/where.c b/src/where.c
index 97eaac8ba..bec77cc45 100644
--- a/src/where.c
+++ b/src/where.c
@@ -6191,12 +6191,16 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
** reference. Verify that this is harmless - that the
** table being referenced really is open.
*/
+#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
|| cursorIsOpen(v,pOp->p1,k)
-#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
|| pOp->opcode==OP_Offset
-#endif
);
+#else
+ assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
+ || cursorIsOpen(v,pOp->p1,k)
+ );
+#endif
}
}else if( pOp->opcode==OP_Rowid ){
pOp->p1 = pLevel->iIdxCur;