-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Complex query with ABS, !=, REGEXP, and CONVERT fails. #1050
Comments
Hey Joel, thanks for opening an issue. |
Another area I'm having problems with is the following: But I get the following: c2 is not null, but is negative. |
Pop your schema and data in here and we'll repro/fix. |
Actually, I think this is going to be auto-closed... sigh... abs(string) == nil. cqtm. Sorry for the trouble. Fun looking at your database code though. |
Glad you figured it out :-) Thanks for poking at our code. |
I created a query that does something like the following:
Table atable c1 = long. c2 = int, c3=int
Table btable c1 = long
select a.c1, a.c2, a.c3 from atable a JOIN btable b on a.c1=b.c1 WHERE (ABS(a.c2) = 1) AND a.c3 != 10 AND a.c1 REGEXP '^[-]?[0-9]+$' AND CONVERT(a.c1, SIGNED) != 0
Expected:
1 row in the result.
Actual:
no results.
Note: If I remove the ABS, the above query works! Also, if I do a.c2 = 1 OR a.c2 = -1, it also works in a standard mysql client.
I'm a little puzzled because I don't see that the CONVERT is officially supported, however the ABS is supported?
The text was updated successfully, but these errors were encountered: