SELECT
*
FROM
foo
LIMIT 10000; -- This `LIMIT` is respected.
SELECT
*
FROM
foo
LIMIT
10000; -- This `LIMIT` is ignored and overridden by `LIMIT 1000`.
-- Also, the warning "The result was limited to 1000 rows" is shown.
Cause
The LIMIT detection is implemented a bit poorly, not utilizing the lexed tokens (source):
def _has_limit(self, sql):
if not sql:
return False
return "limit " in sql.lower()
Cause
The
LIMITdetection is implemented a bit poorly, not utilizing the lexed tokens (source):