diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-02-28 10:37:11 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-02-28 10:37:11 +0200 |
commit | c3246e4bf0b578276d776b378d24b805d85dff24 (patch) | |
tree | c15f0b884d7b6cddf117e6e88a9673206556bdcb /mysql-test/include | |
parent | 0d55914d968fcc557d4429a37c61fbdedd9352a6 (diff) | |
parent | 6ac44ac3abec2263bc7ab9745cd52cc0ad214d8a (diff) | |
download | mariadb-git-c3246e4bf0b578276d776b378d24b805d85dff24.tar.gz |
Merge 10.8 into 10.9
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; |