mirror of
https://github.com/MariaDB/server.git
synced 2025-02-15 09:55:33 +01:00
![Monty](/assets/img/avatar_default.png)
This is done by mapping most of the existing MySQL unicode 0900 collations to MariadB 1400 unicode collations. The assumption is that 1400 is a super set of 0900 for all practical purposes. I also added a new function 'compare_collations()' and changed most code to use this instead of comparing character sets directly. This enables one to seamlessly mix-and-match the corresponding 0900 and 1400 sets. Field comparision and alter table treats the character sets as identical. All MySQL 8.0 0900 collations are supported except: - utf8mb4_ja_0900_as_cs - utf8mb4_ja_0900_as_cs_ks - utf8mb4_ru_0900_as_cs - utf8mb4_zh_0900_as_cs These do not have corresponding entries in the MariadB 01400 collations. Other things: - Added COMMENT colum to information_schema.collations. For utf8mb4_0900 colletions it contains the corresponding alias collation.
41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
DROP USER dbdict_test@localhost;
|
|
CREATE USER dbdict_test@localhost;
|
|
connect con,localhost,dbdict_test,,;
|
|
|
|
SELECT *
|
|
FROM information_schema.character_sets
|
|
WHERE character_set_name IN ('utf8mb3','latin1','binary')
|
|
ORDER BY character_set_name;
|
|
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
|
|
binary binary Binary pseudo charset 1
|
|
latin1 latin1_swedish_ci cp1252 West European 1
|
|
utf8mb3 utf8mb3_general_ci UTF-8 Unicode 3
|
|
|
|
SELECT *
|
|
FROM information_schema.collations
|
|
WHERE character_set_name IN ('utf8mb3','latin1','binary')
|
|
AND (collation_name LIKE CONCAT(character_set_name,'_general_ci')
|
|
OR
|
|
collation_name LIKE CONCAT(character_set_name,'_bin'))
|
|
ORDER BY collation_name;
|
|
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COMMENT
|
|
latin1_bin latin1 47 Yes 1 cp1252 West European
|
|
latin1_general_ci latin1 48 Yes 1 cp1252 West European
|
|
utf8mb3_bin utf8mb3 83 Yes 1 UTF-8 Unicode
|
|
utf8mb3_general_ci utf8mb3 33 Yes Yes 1 UTF-8 Unicode
|
|
|
|
SELECT *
|
|
FROM information_schema.collation_character_set_applicability
|
|
WHERE character_set_name IN ('utf8mb3','latin1','binary')
|
|
AND (collation_name LIKE CONCAT(character_set_name,'_general_ci')
|
|
OR
|
|
collation_name LIKE CONCAT(character_set_name,'_bin'))
|
|
ORDER BY collation_name, character_set_name;
|
|
COLLATION_NAME CHARACTER_SET_NAME FULL_COLLATION_NAME ID IS_DEFAULT
|
|
latin1_bin latin1 latin1_bin 47
|
|
latin1_general_ci latin1 latin1_general_ci 48
|
|
utf8mb3_bin utf8mb3 utf8mb3_bin 83
|
|
utf8mb3_general_ci utf8mb3 utf8mb3_general_ci 33 Yes
|
|
connection default;
|
|
disconnect con;
|
|
DROP USER dbdict_test@localhost;
|