Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
Description
In this definition in ctype-utf8.c:
static MY_CHARSET_HANDLER my_charset_filename_handler=
|
{
|
NULL, /* init */
|
my_ismbchar_utf8,
|
my_mbcharlen_utf8, /* TODO: this is wrong */
|
...
|
};
|
using utf8 functions for "filename" looks wrong.
It must have its own functions.
This bug is about ismbchar() which has a simple repeatable SQL script.
The problem with mbcharlen() is reported separately in MDEV-7819.
Prove:
SET NAMES utf8;
|
SELECT @a:=CONVERT('aя' USING filename) AS `@a`, binary @a, reverse(@a), hex(@a), hex(reverse(@a));
|
returns:
+-----+-----------+-------------+----------+------------------+
|
| @a | binary @a | reverse(@a) | hex(@a) | hex(reverse(@a)) |
|
+-----+-----------+-------------+----------+------------------+
|
| aя | a@r1 | 1r?a | 61407231 | 31724061 |
|
+-----+-----------+-------------+----------+------------------+
|
This is wrong. The expected result should be:
'яa' for `reverse(@a)`
'40723161' for `hex(reverse(@a))`.