You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7020813
Browse filesBrowse the repository at this point in the historyBrowse files
fix: lex MySQL backslash escapes consistently in string literals (#2790)
With backslash escapes enabled, as in the MySQL and MariaDB presets,
the lexer recognized only a few escapes and no doubled quote in the
same literal. 'it\'s ''x''' silently split into a string and an alias,
'a\0b\'c', '\Z\'' and 'a''b\'c' failed, and the double-quoted "it\"s"
ended at the escaped quote.
Let both quote styles read any backslash escape and doubled quotes,
then trim the token to the closing quote of the rules in effect. A
backslash only escapes with backslash escapes enabled or in PostgreSQL
E'' strings, so standard strings, LIKE ... ESCAPE '\' and quoted
identifiers such as "col\" are unchanged.
Signed-off-by: minleejae <mmj9808@gmail.com>
Copy file name to clipboardExpand all lines: src/site/sphinx/usage.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1568,7 +1568,7 @@ The individual features
1568
1568
* - ``withBackslashEscapeCharacter``
1569
1569
- ``\\..`` escaping inside string literals, in addition to the standard ``'..`` doubling
1570
1570
* - ``withDoubleQuotedStrings``
1571
-
- ``".."`` reads as a string literal instead of a quoted identifier (BigQuery, Spark/Databricks, MySQL default ``sql_mode``)
1571
+
- ``".."`` reads as a string literal instead of a quoted identifier (BigQuery, Spark/Databricks, MySQL default ``sql_mode``); combined with ``withBackslashEscapeCharacter``, ``\\"`` does not end the literal, as in MySQL ``"it\\"s"``
0 commit comments