JDBC Parser Misinterprets "--" Inside String Literals as SQL Comment in Local File EXPORT/IMPORT Statements
Details
| Detail name | Value |
|---|---|
| Changelog Number | 27614 |
| Type | Bug |
| Status | Open |
| Affected Versions | Exasol 7.1.7 |
Description
The Exasol JDBC driver incorrectly parses the sequence -- in Local File EXPORT or IMPORT statements when it appears within string literals (enclosed in single or double quotes). Even though it is part of a quoted string (e.g., a filename or other parameter), it is misinterpreted as the start of a single-line SQL comment. This results in incorrect query parsing and causes otherwise valid statements to fail.
Workaround
Avoid using the sequence - within string literals in Local File EXPORT or IMPORT statements (e.g., filenames or other parameters). Modify the value to remove or replace (for example, use {} or _ instead).
Fix
Updated the Exasol JDBC query parser to correctly handle - within string literals. The parser now respects quoted contexts and no longer interprets - inside single or double quotes as the start of a comment, ensuring that valid statements execute successfully.