We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sqlparser seems to not respect parentheses, x * (a div b) is executed as x * a div b. It works correctly when executed directly in MySQL.
x * (a div b)
x * a div b
select hex(0x4000000000000000*(1500 div 1000));
Expected output:
+-----------------------------------------+ | hex(0x4000000000000000*(1500 div 1000)) | +-----------------------------------------+ | 4000000000000000 | +-----------------------------------------+ 1 row in set (0.00 sec)
Actual output:
ERROR 1690 (22003): vtgate: http://localhost:15001/: target: shard.0.master, used tablet: zone1-150 (localhost): vttablet: rpc error: code = InvalidArgument desc = BIGINT UNSIGNED value is out of range in '(0x4000000000000000 * 1500)' (errno 1690) (sqlstate 22003) (CallerID: userData1): Sql: "select hex(0x4000000000000000 * :vtg1 div :vtg2) from dual", BindVars: {#maxLimit: "type:INT64 value:\"10001\" "vtg1: "type:INT64 value:\"1500\" "vtg2: "type:INT64 value:\"1000\" "}
Ubuntu 18.04.5 LTS
Linux 5.3.0-62-generic
x86_64
The text was updated successfully, but these errors were encountered:
systay
Successfully merging a pull request may close this issue.
Overview of the Issue
sqlparser seems to not respect parentheses,
x * (a div b)
is executed asx * a div b
. It works correctly when executed directly in MySQL.Reproduction Steps
select hex(0x4000000000000000*(1500 div 1000));
Expected output:
Actual output:
Operating system and Environment details
Ubuntu 18.04.5 LTS
Linux 5.3.0-62-generic
x86_64
The text was updated successfully, but these errors were encountered: