Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.3.12, 5.5.40, 10.0.14, 10.6, 10.11, 11.4, 11.8, 12.1
-
None
-
None
Description
MariaDB [test]> SELECT HEX(_ucs2'abc' ''),HEX(_ucs2 'ab' 'c'), HEX(_ucs2'a' 'bc');
|
+--------------------+---------------------+--------------------+
|
| HEX(_ucs2'abc' '') | HEX(_ucs2 'ab' 'c') | HEX(_ucs2'a' 'bc') |
|
+--------------------+---------------------+--------------------+
|
| 00616263 | 61620063 | 006100620063 |
|
+--------------------+---------------------+--------------------+
|
1 row in set (0.00 sec)
|
The leftmost chunk is "cast" to the character set of the introducer.
The second and further chunks are converted.
All chunks must be either "cast" individually,
or all chunks must be concatenated together, then cast.
Btw, according to the SQL standard, all chunks should
actually be converted (not cast!) from the session character set
to the introducer character set. But this can be changed only
in a major release (10.1?).