diff options
author | Alexander Barkov <bar@mariadb.com> | 2023-02-23 22:19:26 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2023-02-23 23:40:45 +0400 |
commit | b62123e0d517a63fb7a1192093fd3cafcfe9d480 (patch) | |
tree | 3ef985ab99f8aaaae08b575c02fa2f73f5796b82 /mysql-test/include | |
parent | b12cd88ce177b475066734b06c1e3a4445a62d86 (diff) | |
download | mariadb-git-b62123e0d517a63fb7a1192093fd3cafcfe9d480.tar.gz |
MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
The array my_unicase_pages_unicode520[7] erroneously mapped to plane06
instead of plane07.
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/ctype_unicode_casefold_bmp.inc | 23 | ||||
-rw-r--r-- | mysql-test/include/ctype_unicode_casefold_supplementary.inc | 22 | ||||
-rw-r--r-- | mysql-test/include/ctype_unicode_ws_bmp.inc | 26 | ||||
-rw-r--r-- | mysql-test/include/ctype_unicode_ws_supplementary.inc | 19 |
4 files changed, 90 insertions, 0 deletions
diff --git a/mysql-test/include/ctype_unicode_casefold_bmp.inc b/mysql-test/include/ctype_unicode_casefold_bmp.inc new file mode 100644 index 00000000000..e5b16b9334e --- /dev/null +++ b/mysql-test/include/ctype_unicode_casefold_bmp.inc @@ -0,0 +1,23 @@ +--source include/have_utf32.inc +--source include/have_ucs2.inc +--source include/have_sequence.inc + +EXECUTE IMMEDIATE SFORMAT(' +CREATE VIEW v_bmp AS +SELECT + seq AS codepoint, + LPAD(HEX(seq),4,''0'') AS codepoint_hex4, + CONVERT(CHAR(seq USING utf32) USING {}) COLLATE {} AS c +FROM + seq_0_to_65535', @@character_set_connection, @@collation_connection); + +SELECT COLLATION(c) FROM v_bmp LIMIT 1; + +SELECT + codepoint_hex4, + HEX(CAST(LOWER(c) AS CHAR CHARACTER SET ucs2)), + HEX(CAST(UPPER(c) AS CHAR CHARACTER SET ucs2)) +FROM v_bmp +WHERE BINARY(c)<>BINARY(LOWER(c)) OR BINARY(c)<>BINARY(UPPER(c)); + +DROP VIEW v_bmp; diff --git a/mysql-test/include/ctype_unicode_casefold_supplementary.inc b/mysql-test/include/ctype_unicode_casefold_supplementary.inc new file mode 100644 index 00000000000..bb603118db6 --- /dev/null +++ b/mysql-test/include/ctype_unicode_casefold_supplementary.inc @@ -0,0 +1,22 @@ +--source include/have_utf32.inc +--source include/have_sequence.inc + +EXECUTE IMMEDIATE SFORMAT(' +CREATE VIEW v_supplementary AS +SELECT + seq AS codepoint, + LPAD(HEX(seq),8,''0'') AS codepoint_hex8, + CONVERT(CHAR(seq USING utf32) USING {}) COLLATE {} AS c +FROM + seq_65536_to_1114111', @@character_set_connection, @@collation_connection); + +SELECT COLLATION(c) FROM v_supplementary LIMIT 1; + +SELECT + codepoint_hex8, + HEX(CAST(LOWER(c) AS CHAR CHARACTER SET utf32)), + HEX(CAST(UPPER(c) AS CHAR CHARACTER SET utf32)) +FROM v_supplementary +WHERE BINARY(c)<>BINARY(LOWER(c)) OR BINARY(c)<>BINARY(UPPER(c)); + +DROP VIEW v_supplementary; diff --git a/mysql-test/include/ctype_unicode_ws_bmp.inc b/mysql-test/include/ctype_unicode_ws_bmp.inc new file mode 100644 index 00000000000..31166b5d31a --- /dev/null +++ b/mysql-test/include/ctype_unicode_ws_bmp.inc @@ -0,0 +1,26 @@ +--source include/have_utf32.inc +--source include/have_sequence.inc + +EXECUTE IMMEDIATE SFORMAT(' +CREATE VIEW v_bmp AS +SELECT + seq AS codepoint, + LPAD(HEX(seq),4,''0'') AS codepoint_hex4, + CONVERT(CHAR(seq USING utf32) USING {}) COLLATE {} AS c +FROM + seq_0_to_65535', @@character_set_connection, @@collation_connection); + +SELECT COLLATION(c) FROM v_bmp LIMIT 1; + +SELECT HEX(codepoint) FROM v_bmp WHERE HEX(WEIGHT_STRING(c))='FFFD'; + +SELECT + SUM(codepoint_hex4=HEX(WEIGHT_STRING(c))) AS count_bmp_weight_is_codepoint, + SUM(codepoint_hex4<>HEX(WEIGHT_STRING(c))) AS count_bmp_weight_is_not_codepoint +FROM v_bmp; + +SELECT codepoint_hex4,HEX(WEIGHT_STRING(c)) +FROM v_bmp +WHERE codepoint_hex4<>HEX(WEIGHT_STRING(c)); + +DROP VIEW v_bmp; diff --git a/mysql-test/include/ctype_unicode_ws_supplementary.inc b/mysql-test/include/ctype_unicode_ws_supplementary.inc new file mode 100644 index 00000000000..82273e8fb6a --- /dev/null +++ b/mysql-test/include/ctype_unicode_ws_supplementary.inc @@ -0,0 +1,19 @@ +--source include/have_utf32.inc +--source include/have_sequence.inc + +EXECUTE IMMEDIATE SFORMAT(' +CREATE VIEW v_supplementary AS +SELECT + seq AS codepoint, + CONVERT(CHAR(seq USING utf32) USING {}) COLLATE {} AS c +FROM + seq_65536_to_1114111', @@character_set_connection, @@collation_connection); + +SELECT COLLATION(c) FROM v_supplementary LIMIT 1; + +SELECT + SUM(HEX(WEIGHT_STRING(c))<>'FFFD'), + SUM(HEX(WEIGHT_STRING(c))='FFFD') +FROM v_supplementary; + +DROP VIEW v_supplementary; |