Commit 95d51369 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.10 into 10.11

parents 8460eb25 f14d9fa0
......@@ -483,7 +483,7 @@ ADD_SUBDIRECTORY(support-files)
ADD_SUBDIRECTORY(extra/aws_sdk)
IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
SET(EXPORTED comp_err comp_sql factorial)
SET(EXPORTED comp_err comp_sql factorial uca-dump)
IF(NOT WITHOUT_SERVER)
SET(EXPORTED ${EXPORTED} gen_lex_hash gen_lex_token)
ENDIF()
......
......@@ -80,10 +80,26 @@ typedef const struct my_charset_handler_st MY_CHARSET_HANDLER;
typedef const struct my_collation_handler_st MY_COLLATION_HANDLER;
typedef const struct unicase_info_st MY_UNICASE_INFO;
typedef const struct casefold_info_st MY_CASEFOLD_INFO;
typedef const struct uni_ctype_st MY_UNI_CTYPE;
typedef const struct my_uni_idx_st MY_UNI_IDX;
typedef uint16 decimal_digits_t;
typedef struct casefold_info_char_t
{
uint32 toupper;
uint32 tolower;
} MY_CASEFOLD_CHARACTER;
struct casefold_info_st
{
my_wc_t maxchar;
MY_CASEFOLD_CHARACTER **page;
};
typedef struct unicase_info_char_st
{
uint32 toupper;
......@@ -720,6 +736,9 @@ struct my_charset_handler_st
*/
my_charset_conv_wc_mb native_to_mb;
my_charset_conv_wc_mb wc_to_printable;
uint (*caseup_multiply)(CHARSET_INFO *cs);
uint (*casedn_multiply)(CHARSET_INFO *cs);
};
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
......@@ -752,12 +771,11 @@ struct charset_info_st
MY_UCA_INFO *uca;
const uint16 *tab_to_uni;
MY_UNI_IDX *tab_from_uni;
MY_CASEFOLD_INFO *casefold;
MY_UNICASE_INFO *caseinfo;
const uchar *state_map;
const uchar *ident_map;
uint strxfrm_multiply;
uchar caseup_multiply;
uchar casedn_multiply;
uint mbminlen;
uint mbmaxlen;
/*
......@@ -827,6 +845,16 @@ struct charset_info_st
return (cset->casedn)(this, src, srclen, dst, dstlen);
}
uint caseup_multiply() const
{
return (cset->caseup_multiply)(this);
}
uint casedn_multiply() const
{
return (cset->casedn_multiply)(this);
}
size_t long10_to_str(char *dst, size_t dstlen,
int radix, long int val) const
{
......
......@@ -13,6 +13,14 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
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;
--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;
--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;
--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;
--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;
......@@ -697,6 +697,13 @@ ORDER BY a, HEX(a);
--horizontal_results
DROP TABLE t1;
--echo #
--echo # MDEV-30661 UPPER() returns an empty string for U+0251 in uca1400 collations for utf8
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_uca1400_test01_as_ci;
--source include/ctype_casefolding.inc
--echo #
--echo # End of 10.10 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET collation_connection=ucs2_general_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET @@collation_connection=ucs2_general_ci;
--source include/ctype_unicode_ws_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET @@collation_connection=ucs2_general_mysql500_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET @@collation_connection=ucs2_general_mysql500_ci;
--source include/ctype_unicode_ws_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET @@collation_connection=ucs2_turkish_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET @@collation_connection=ucs2_unicode_520_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
......@@ -612,6 +612,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -625,6 +631,53 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB C9AB ɫ
271 C9B1 C9B1 ɱ
27D C9BD C9BD ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb3 COLLATE utf8mb3_turkish_ci /*Unicode-4.0 folding, with Turkish mapping for I */;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
Table Create Table
case_folding CREATE TABLE `case_folding` (
`code` int(1) NOT NULL,
`c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_turkish_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
23A C8BA C8BA Ⱥ
23E C8BE C8BE Ⱦ
23F C8BF C8BF ȿ
240 C980 C980 ɀ
250 C990 C990 ɐ
251 C991 C991 ɑ
252 C992 C992 ɒ
26B C9AB C9AB ɫ
271 C9B1 C9B1 ɱ
27D C9BD C9BD ɽ
49 C4B1 49 I
69 69 C4B0 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -645,6 +698,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -658,6 +717,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_nopad_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -678,6 +741,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -691,6 +760,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb3 COLLATE utf8mb3_myanmar_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -711,6 +784,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -724,6 +803,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb3 COLLATE utf8mb3_thai_520_w2;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -744,6 +827,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -757,6 +846,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
#
# End of 10.3 tests
......@@ -1533,3 +1626,55 @@ SET NAMES utf8mb3;
#
# End of 10.10 tests
#
#
# Start of 10.10 tests
#
#
# MDEV-30661 UPPER() returns an empty string for U+0251 in uca1400 collations for utf8
#
SET NAMES utf8mb3 COLLATE utf8mb3_uca1400_ai_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
Table Create Table
case_folding CREATE TABLE `case_folding` (
`code` int(1) NOT NULL,
`c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
23A E2B1A5 C8BA Ⱥ
23E E2B1A6 C8BE Ⱦ
23F C8BF E2B1BE ȿ
240 C980 E2B1BF ɀ
250 C990 E2B1AF ɐ
251 C991 E2B1AD ɑ
252 C992 E2B1B0 ɒ
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
#
# End of 10.10 tests
#
......@@ -34,6 +34,9 @@ SET NAMES utf8 COLLATE utf8_unicode_nopad_ci;
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_ci /*Unicode-4.0 folding*/;
--source include/ctype_casefolding.inc
SET NAMES utf8mb3 COLLATE utf8mb3_turkish_ci /*Unicode-4.0 folding, with Turkish mapping for I */;
--source include/ctype_casefolding.inc
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_ci;
--source include/ctype_casefolding.inc
......@@ -79,3 +82,19 @@ SET NAMES utf8mb3;
--echo #
--echo # End of 10.10 tests
--echo #
--echo #
--echo # Start of 10.10 tests
--echo #
--echo #
--echo # MDEV-30661 UPPER() returns an empty string for U+0251 in uca1400 collations for utf8
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_uca1400_ai_ci;
--source include/ctype_casefolding.inc
--echo #
--echo # End of 10.10 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_general_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_general_ci;
--source include/ctype_unicode_ws_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_general_mysql500_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_general_mysql500_ci;
--source include/ctype_unicode_ws_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_turkish_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_ci;
--source include/ctype_unicode_casefold_bmp.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_general_ci;
--source include/ctype_unicode_casefold_bmp.inc
--source include/ctype_unicode_casefold_supplementary.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_general_ci;
--source include/ctype_unicode_ws_bmp.inc
--source include/ctype_unicode_ws_supplementary.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_turkish_ci;
--source include/ctype_unicode_casefold_bmp.inc
--source include/ctype_unicode_casefold_supplementary.inc
--echo #
--echo # End of 10.7 tests
--echo #
......@@ -6630,6 +6630,55 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
23A C8BA C8BA Ⱥ
23E C8BE C8BE Ⱦ
23F C8BF C8BF ȿ
240 C980 C980 ɀ
250 C990 C990 ɐ
251 C991 C991 ɑ
252 C992 C992 ɒ
26B C9AB C9AB ɫ
271 C9B1 C9B1 ɱ
27D C9BD C9BD ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb4 COLLATE utf8mb4_turkish_ci /*Unicode-4.0 folding with Turkish mapping for I */;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
Table Create Table
case_folding CREATE TABLE `case_folding` (
`code` int(1) NOT NULL,
`c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_turkish_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -6643,6 +6692,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB C9AB ɫ
271 C9B1 C9B1 ɱ
27D C9BD C9BD ɽ
49 C4B1 49 I
69 69 C4B0 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -6663,6 +6716,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -6676,6 +6735,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -6696,6 +6759,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -6709,6 +6778,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -6729,6 +6802,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -6742,6 +6821,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
SET NAMES utf8mb4 COLLATE utf8mb4_thai_520_w2;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
......@@ -6762,6 +6845,12 @@ INSERT INTO case_folding (code) VALUES
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
......@@ -6775,6 +6864,10 @@ HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
#
# End of 10.3 tests
......@@ -11379,5 +11472,51 @@ DROP TABLE t1;
DROP PROCEDURE exec_verbose;
DROP PROCEDURE test_styles;
#
# MDEV-30661 UPPER() returns an empty string for U+0251 in uca1400 collations for utf8
#
SET NAMES utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
Table Create Table
case_folding CREATE TABLE `case_folding` (
`code` int(1) NOT NULL,
`c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);
INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
23A E2B1A5 C8BA Ⱥ
23E E2B1A6 C8BE Ⱦ
23F C8BF E2B1BE ȿ
240 C980 E2B1BF ɀ
250 C990 E2B1AF ɐ
251 C991 E2B1AD ɑ
252 C992 E2B1B0 ɒ
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
49 69 49 I
69 69 49 i
130 69 C4B0 İ
131 C4B1 49 ı
DROP TABLE case_folding;
#
# End of 10.10 tests
#
......@@ -121,6 +121,9 @@ SET NAMES utf8mb4;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci /*Unicode-4.0 folding*/;
--source include/ctype_casefolding.inc
SET NAMES utf8mb4 COLLATE utf8mb4_turkish_ci /*Unicode-4.0 folding with Turkish mapping for I */;
--source include/ctype_casefolding.inc
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci;
--source include/ctype_casefolding.inc
......@@ -426,6 +429,13 @@ DROP TABLE t1;
DROP PROCEDURE exec_verbose;
DROP PROCEDURE test_styles;
--echo #
--echo # MDEV-30661 UPPER() returns an empty string for U+0251 in uca1400 collations for utf8
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;
--source include/ctype_casefolding.inc
--echo #
--echo # End of 10.10 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci;
--source include/ctype_unicode_casefold_bmp.inc
--source include/ctype_unicode_casefold_supplementary.inc
--echo #
--echo # End of 10.7 tests
--echo #
This diff is collapsed.
--echo #
--echo # Start of 10.7 tests
--echo #
--echo #
--echo # MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
--source include/ctype_unicode_casefold_bmp.inc
--source include/ctype_unicode_casefold_supplementary.inc
--echo #
--echo # End of 10.7 tests
--echo #
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_dbug=@@GLOBAL.debug_dbug;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
f3 int generated always as (f2 * 2) VIRTUAL,
primary key(f1), INDEX (f3))ENGINE=InnoDB;
connect con1,localhost,root,,,;
InnoDB 0 transactions not purged
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
INSERT INTO t1(f1, f2) VALUES(1,2);
......@@ -18,5 +22,6 @@ commit;
disconnect con1;
disconnect con2;
connection default;
set global debug_dbug=default;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SET GLOBAL debug_dbug=@save_dbug;
DROP TABLE t1;
This diff is collapsed.
SET @save_freq=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t (a int PRIMARY KEY, b int NOT NULL UNIQUE) engine = InnoDB;
InnoDB 0 transactions not purged
connect prevent_purge,localhost,root,,;
start transaction with consistent snapshot;
connect con_del_1,localhost,root,,;
......@@ -34,3 +37,4 @@ disconnect con_del_2;
connection default;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_freq;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment