Re: Adding collation to utf8mb4 charset
Posted by: Xing Zhang
Date: May 01, 2018 10:00PM

This is because you choose a wrong collation id.

Your collation id for utf8mb4_myown_ci is 213, which conflicts with utf8_croatian_ci, which is a utf8 collation. All your input is checked by utf8_croation_ci.

Please refer to: https://dev.mysql.com/doc/refman/8.0/en/adding-collation-choosing-id.html to choose a good id, then it will work. (I checked this with 501).

mysql> select * from information_schema.collations order by id;
......
| utf8mb4_myown_ci | utf8mb4 | 501 | | | 8 | PAD SPACE |
+----------------------------+--------------------+-----+------------+-------------+---------+---------------+
271 rows in set (0.03 sec)

mysql> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> create table t1(a varchar(10) collate utf8mb4_myown_ci);
Query OK, 0 rows affected (0.57 sec)

mysql> insert into t1 values(_utf32 0x0001f37a);
Query OK, 1 row affected (0.14 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Adding collation to utf8mb4 charset
1435
May 01, 2018 10:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.