Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql query limit 0 #2084

Closed
hereisok opened this issue Jan 10, 2020 · 0 comments
Closed

mysql query limit 0 #2084

hereisok opened this issue Jan 10, 2020 · 0 comments

Comments

@hereisok
Copy link

"limit 0" is a legal operation in MySQL

LIMIT 0 quickly returns an empty set. This can be useful for checking the validity of a query. It can also be employed to obtain the types of the result columns within applications that use a MySQL API that makes result set metadata available. With the mysql client program, you can use the --column-type-info option to display result column types.

But in peewee,
limit 0 will be converted to LIMIT 2 ** 64-1

peewee/peewee.py

Line 2023 in fc342dd

def _apply_ordering(self, ctx):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant