Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
the client-side SQL parser (ClientParser), used to locate ? placeholders and to rewrite batches, has a parsing bugs:
line comment "--" inside expressions are treated as a comment.
Any "--" was treated as the start of an end-of-line comment.
In MariaDB/MySQL, line comments only begins a comment when followed by whitespace or a control character, in an expression such as SELECT 2--1 (subtraction of a negative) the – is an operator, not a comment.
The parser wrongly entered comment mode and discarded the rest of the statement, leading to incorrect placeholder splitting / query rewriting.