From 0845bce0d95fcb7a3b21e17864901d888d276dcb Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 3 Feb 2023 16:57:53 +0400 Subject: MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 --- mysql-test/include/ctype_casefolding.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mysql-test/include/ctype_casefolding.inc (limited to 'mysql-test/include') diff --git a/mysql-test/include/ctype_casefolding.inc b/mysql-test/include/ctype_casefolding.inc new file mode 100644 index 00000000000..4ee402c95ad --- /dev/null +++ b/mysql-test/include/ctype_casefolding.inc @@ -0,0 +1,18 @@ +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +# Uncode code points that have a variable length case mapping in utf8 +# (e.g. LOWER('2-byte-character') -> '3-byte-character' +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +DROP TABLE case_folding; -- cgit v1.2.1