Failing SQL Feature
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
DROP TABLE IF EXISTS custom_strings;
CREATE TABLE custom_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.
Failing SQL Feature
MySQL charset introducer
_utf8mb4used withCOLLATEon string literals.MySQL allows specifying a character set directly on string literals using introducers like
_utf8mb4,_latin1,_binary. This can be combined withCOLLATEto explicitly define collation for the literal.SQL Example
Parsing Error
ParseException: Encountered: <K_COLLATE> / "COLLATE", at line 1, column 28, in lexical state DEFAULT.