Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
11.4
-
None
Description
I run this query:
SELECT collation_name, id, comment |
FROM information_schema.collations |
WHERE collation_name='utf8mb4_0900_bin'; |
It says utf8mb4_0900_bin is an alias for utf8mb4_bin:
+------------------+------+-----------------------+
|
| collation_name | id | comment |
|
+------------------+------+-----------------------+
|
| utf8mb4_0900_bin | 309 | Alias for utf8mb4_bin |
|
+------------------+------+-----------------------+
|
This looks wrong.
According to https://dev.mysql.com/doc/refman/8.4/en/charset-mysql.html, utf8mb4_0900_bin is a NO PAD collation:
| utf8mb4_0900_bin | utf8mb4 | 309 | | Yes | 1 | NO PAD |
|
utf8mb4_0900_bin should be fixed to be an alias for utf8mb4_nopad_bin.
MySQL
MySQL [test]> SET NAMES utf8mb4 COLLATE utf8mb4_0900_bin;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MySQL [test]> SELECT 'a\t'<'a';
|
+-----------+
|
| 'a\t'<'a' |
|
+-----------+
|
| 0 |
|
+-----------+
|
1 row in set (0.000 sec)
|
|
MySQL [test]> SET NAMES utf8mb4 COLLATE utf8mb4_bin;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MySQL [test]> SELECT 'a\t'<'a';
|
+-----------+
|
| 'a\t'<'a' |
|
+-----------+
|
| 1 |
|
+-----------+
|
1 row in set (0.000 sec)
|
MariaDB
MariaDB [test]> SET NAMES utf8mb4 COLLATE utf8mb4_0900_bin;
|
Query OK, 0 rows affected (0.001 sec)
|
|
MariaDB [test]> SELECT 'a\t'<'a';
|
+-----------+
|
| 'a\t'<'a' |
|
+-----------+
|
| 1 | <--- 0 is expected here
|
+-----------+
|
1 row in set (0.001 sec)
|
|
MariaDB [test]> SET NAMES utf8mb4 COLLATE utf8mb4_bin;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [test]> SELECT 'a\t'<'a';
|
+-----------+
|
| 'a\t'<'a' |
|
+-----------+
|
| 1 |
|
+-----------+
|
1 row in set (0.001 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-20912 Add support for utf8mb4_0900_* collations in MariaDB Server
-
- Closed
-
-
MDEV-36213 Doubled memory usage (11.4.4 <-> 11.4.5)
-
- Confirmed
-
Activity
Transition | Time In Source Status | Execution Times |
---|
|
3h 25m | 1 |