You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rows_where() raises OperationalError when offset is given without limit #816
Root cause: In db.pyrows_where() appends OFFSET N to the SQL only when limit is not None is False, but SQLite requires LIMIT to appear before OFFSET. The generated SQL is SELECT * FROM "t" OFFSET 2, which is invalid syntax.
The same issue affects search_sql() when offset is given without limit.
Fix: When offset is set but limit is not, emit LIMIT -1 before the OFFSET clause. SQLite treats a negative limit as "no upper bound", so LIMIT -1 OFFSET N correctly returns all rows starting from position N.
Activity
Emit LIMIT -1 when offset is used without limit (simonw#821)
Changelog updates
Release 4.2