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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL: Fix how empty `where` param makes bogus WHERE syntax. #619

merged 1 commit into from May 14, 2013


2 participants

terraflubb commented May 14, 2013

With an empty where param, it would generate '' as the where parameters, which is not valid SQL. Now it returns 1=1 if instead of the empty string, as suggested by @muka in #606 (which this PR fixes).

Added failing MySQL tests for SelectQuery when the where is all kinds of empty and because I felt generous 馃槢 there's also a new test in here for when you have multiple tuples in the where property (that one passed right away).

MySQL: Empty `where` param makes bogus query.
Added failing MySQL tests for SelectQuery when the `where` is all kinds of empty.
Now it returns `1=1` if nothing else, as suggested by @muka.

@sdepold sdepold merged commit 4b69b34 into sequelize:master May 14, 2013

1 check failed

default The Travis CI build failed

This comment has been minimized.


sdepold commented May 14, 2013

thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment