Description
SELECT * FROM user WHERE (key=<UUID>);
Bad Request: line 1:25 no viable alternative at input '('
SELECT * FROM user WHERE key=<UUID>; – No parens
– Normal output
The example provided is minimal, bug was discovered with AND logic on indexed columns.
Parens-enclosed conditions is good SQL and so is produced by database abstraction layers in complex queries to avoid operation precedence problems.
Fixing this at application side is no option - this will open the can of logic bugs.