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
-
Pushed under a wrong MDEV number in a mistake:
commit 3bbe11acd93ad63ed1d90656e11a665d6326996f (HEAD -> 11.4, origin/bb-11.4-bar-MDEV-36361, origin/HEAD, origin/11.4)
Author: Alexander Barkov <bar@mariadb.com>
Date: Mon Mar 24 18:54:45 2025 +0400
MDEV-20912 Add support for utf8mb4_0900_* collations in MariaDB Server
Fixing a wrong alias utf8mb4_0900_bin:
- was utf8mb4_bin
- changed to utf8mb4_nopad_bin
MySQL 0900 collations are NOPAD, including utf8mb4_0900_bin.