mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
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.
This commit is contained in:
@@ -91,7 +91,7 @@ utf8mb4_hu_0900_as_cs utf8mb4 297 Yes 8 Alias for utf8mb4_uca1400_hungarian_nop
|
|||||||
utf8mb4_hr_0900_as_cs utf8mb4 298 Yes 8 Alias for utf8mb4_uca1400_croatian_nopad_as_cs
|
utf8mb4_hr_0900_as_cs utf8mb4 298 Yes 8 Alias for utf8mb4_uca1400_croatian_nopad_as_cs
|
||||||
utf8mb4_vi_0900_as_cs utf8mb4 300 Yes 8 Alias for utf8mb4_uca1400_vietnamese_nopad_as_cs
|
utf8mb4_vi_0900_as_cs utf8mb4 300 Yes 8 Alias for utf8mb4_uca1400_vietnamese_nopad_as_cs
|
||||||
utf8mb4_0900_as_ci utf8mb4 305 Yes 8 Alias for utf8mb4_uca1400_nopad_as_ci
|
utf8mb4_0900_as_ci utf8mb4 305 Yes 8 Alias for utf8mb4_uca1400_nopad_as_ci
|
||||||
utf8mb4_0900_bin utf8mb4 309 Yes 1 Alias for utf8mb4_bin
|
utf8mb4_0900_bin utf8mb4 309 Yes 1 Alias for utf8mb4_nopad_bin
|
||||||
#
|
#
|
||||||
# MDEV-20912 Add support for utf8mb4_0900_* collations in MariaDB Server
|
# MDEV-20912 Add support for utf8mb4_0900_* collations in MariaDB Server
|
||||||
#
|
#
|
||||||
@@ -198,3 +198,16 @@ drop table t1,t2;
|
|||||||
CREATE OR REPLACE TABLE t1 (p int primary key auto_increment, a VARCHAR(10), key (a)) engine=aria, COLLATE utf8mb4_sv_0900_ai_ci;
|
CREATE OR REPLACE TABLE t1 (p int primary key auto_increment, a VARCHAR(10), key (a)) engine=aria, COLLATE utf8mb4_sv_0900_ai_ci;
|
||||||
alter table t1 modify a varchar(10) collate utf8mb4_uca1400_swedish_nopad_ai_ci, algorithm=nocopy;
|
alter table t1 modify a varchar(10) collate utf8mb4_uca1400_swedish_nopad_ai_ci, algorithm=nocopy;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-36361 Wrong utf8mb4_0900_bin alias for utf8mb4_bin (should be utf8mb4_nopad_bin)
|
||||||
|
#
|
||||||
|
SELECT collation_name, id, comment
|
||||||
|
FROM information_schema.collations
|
||||||
|
WHERE collation_name='utf8mb4_0900_bin';
|
||||||
|
collation_name id comment
|
||||||
|
utf8mb4_0900_bin 309 Alias for utf8mb4_nopad_bin
|
||||||
|
SET NAMES utf8mb4 COLLATE utf8mb4_0900_bin;
|
||||||
|
SELECT 'a\t'<'a' AS c1;
|
||||||
|
c1
|
||||||
|
0
|
||||||
|
# End of 11.4 tests
|
||||||
|
@@ -83,3 +83,16 @@ drop table t1,t2;
|
|||||||
CREATE OR REPLACE TABLE t1 (p int primary key auto_increment, a VARCHAR(10), key (a)) engine=aria, COLLATE utf8mb4_sv_0900_ai_ci;
|
CREATE OR REPLACE TABLE t1 (p int primary key auto_increment, a VARCHAR(10), key (a)) engine=aria, COLLATE utf8mb4_sv_0900_ai_ci;
|
||||||
alter table t1 modify a varchar(10) collate utf8mb4_uca1400_swedish_nopad_ai_ci, algorithm=nocopy;
|
alter table t1 modify a varchar(10) collate utf8mb4_uca1400_swedish_nopad_ai_ci, algorithm=nocopy;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-36361 Wrong utf8mb4_0900_bin alias for utf8mb4_bin (should be utf8mb4_nopad_bin)
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SELECT collation_name, id, comment
|
||||||
|
FROM information_schema.collations
|
||||||
|
WHERE collation_name='utf8mb4_0900_bin';
|
||||||
|
|
||||||
|
SET NAMES utf8mb4 COLLATE utf8mb4_0900_bin;
|
||||||
|
SELECT 'a\t'<'a' AS c1;
|
||||||
|
|
||||||
|
--echo # End of 11.4 tests
|
||||||
|
@@ -39646,8 +39646,9 @@ struct mysql_0900_to_mariadb_1400_mapping mysql_0900_mapping[]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static LEX_CSTRING mysql_utf8_bin= { STRING_WITH_LEN("utf8mb4_0900_bin") };
|
static LEX_CSTRING
|
||||||
static LEX_CSTRING mariadb_utf8_bin= { STRING_WITH_LEN("utf8mb4_bin") };
|
mysql_utf8mb4_0900_bin= {STRING_WITH_LEN("utf8mb4_0900_bin")},
|
||||||
|
mariadb_utf8mb4_nopad_bin= {STRING_WITH_LEN("utf8mb4_nopad_bin")};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Map mysql character sets to MariaDB using the same definition but with
|
Map mysql character sets to MariaDB using the same definition but with
|
||||||
@@ -39691,7 +39692,8 @@ my_bool mysql_utf8mb4_0900_collation_definitions_add()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (add_alias_for_collation(&mariadb_utf8_bin, 46, &mysql_utf8_bin, 309))
|
if (add_alias_for_collation(&mariadb_utf8mb4_nopad_bin, 1070,
|
||||||
|
&mysql_utf8mb4_0900_bin, 309))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user