-
-
Notifications
You must be signed in to change notification settings - Fork 228
Open
Description
Describe the bug
node-sql-parser currently fails to parse the parenthesis-less form of the MySQL BINARY operator. In MySQL, BINARY can be used both as an operator (without parentheses) and as a function (with parentheses), but the parser only supports the function form.
Database Engine
MySQL
To Reproduce
-- Example 1: In SELECT clause
SELECT BINARY username, COUNT(*)
FROM users;
-- Example 2: In GROUP BY clause
SELECT username, COUNT(*)
FROM users
GROUP BY BINARY username;
-- Example 3: In ORDER BY clause
SELECT username
FROM users
ORDER BY BINARY username;
-- Example 4: In WHERE condition
SELECT *
FROM users
WHERE username = BINARY 'John';Expected behavior
The parser should correctly recognize and handle the parenthesis-less form of the BINARY operator, just as it handles the parenthesized form.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels