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
[BUG] JSQLParser 5.4-SNAPSHOT : MySQL : charset introducer (_utf8mb4) with COLLATE not supported #2427
MySQL charset introducer _utf8mb4 used with COLLATE on string literals.
MySQL allows specifying a character set directly on string literals using introducers like _utf8mb4, _latin1, _binary. This can be combined with COLLATE to explicitly define collation for the literal.
SQL Example
DROPTABLE IF EXISTS custom_strings;
CREATETABLEcustom_strings (
custom_string VARCHAR(255)
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci
);
INSERT INTO custom_strings (custom_string) VALUES ('some text');
SELECT _utf8mb4'some text' COLLATE utf8mb4_unicode_ci AS custom_string;
Parsing Error
ParseException: Encountered: <K_COLLATE> / "COLLATE", at line 1, column 28, in lexical state DEFAULT.
Activity