Skip to content

Commit 7faff4d

Browse files
committed
Merge branch '10.2' into 10.2-mdev9197
2 parents 3b40f78 + 1da21cd commit 7faff4d

22 files changed

+372
-77
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ storage/tokudb/PerconaFT/tools/tokudb_load
198198
storage/tokudb/PerconaFT/tools/tokuftdump
199199
storage/tokudb/PerconaFT/tools/tokuft_logprint
200200
storage/tokudb/PerconaFT/xz/
201+
strings/conf_to_src
201202
support-files/MySQL-shared-compat.spec
202203
support-files/binary-configure
203204
support-files/config.huge.ini

include/m_ctype.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,6 @@ void my_string_metadata_get(MY_STRING_METADATA *metadata,
865865
CHARSET_INFO *cs, const char *str, size_t len);
866866
uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len);
867867
my_bool my_charset_is_ascii_based(CHARSET_INFO *cs);
868-
my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs);
869868
uint my_charset_repertoire(CHARSET_INFO *cs);
870869

871870
uint my_strxfrm_flag_normalize(uint flags, uint nlevels);
@@ -875,8 +874,6 @@ size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
875874
uchar *str, uchar *frmend, uchar *strend,
876875
uint nweights, uint flags, uint level);
877876

878-
my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs);
879-
880877
const MY_CONTRACTIONS *my_charset_get_contractions(CHARSET_INFO *cs,
881878
int level);
882879

mysql-test/r/ctype_ldml.result

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ with all Unicode character sets
55
set names utf8;
66
show variables like 'character_sets_dir%';
77
Variable_name Value
8-
character_sets_dir MYSQL_TEST_DIR/std_data/
8+
character_sets_dir MYSQL_TEST_DIR/std_data/ldml/
99
show collation like 'utf8_phone_ci';
1010
Collation Charset Id Default Compiled Sortlen
1111
utf8_phone_ci utf8 352 8
@@ -454,10 +454,13 @@ select "foo" = "foo " collate latin1_test;
454454
The following tests check that two-byte collation IDs work
455455
select * from information_schema.collations where id>256 and is_compiled<>'Yes' order by id;
456456
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
457+
ascii2_general_ci ascii2 320 Yes 1
458+
ascii2_bin ascii2 321 1
457459
utf8mb4_test_ci utf8mb4 326 8
458460
utf16_test_ci utf16 327 8
459461
utf8mb4_test_400_ci utf8mb4 328 8
460462
latin1_test2 latin1 332 1
463+
latin1_test2_cs latin1 333 1
461464
utf8_bengali_standard_ci utf8 336 8
462465
utf8_bengali_traditional_ci utf8 337 8
463466
utf8_implicit_weights_ci utf8 338 8
@@ -478,6 +481,7 @@ show collation like '%test%';
478481
Collation Charset Id Default Compiled Sortlen
479482
latin1_test latin1 99 Yes 1
480483
latin1_test2 latin1 332 1
484+
latin1_test2_cs latin1 333 1
481485
utf8_test_ci utf8 353 8
482486
ucs2_test_ci ucs2 358 8
483487
utf8mb4_test_ci utf8mb4 326 8
@@ -1179,3 +1183,34 @@ ch w ducet
11791183
3700 FB80B700 FB80B700
11801184
3701 FB80B700 FB80B701
11811185
DROP TABLE t1;
1186+
#
1187+
# Testing that the MY_CS_PUREASCII flag is set properly
1188+
#
1189+
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2, b VARCHAR(10) CHARACTER SET latin1);
1190+
INSERT INTO t1 VALUES ('a','a'),('b','b');
1191+
SELECT * FROM t1 WHERE a=b;
1192+
a b
1193+
a a
1194+
b b
1195+
ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin;
1196+
SELECT * FROM t1 WHERE a=b;
1197+
a b
1198+
a a
1199+
b b
1200+
DROP TABLE t1;
1201+
#
1202+
# Testing that the MY_CS_CSSORT flag is set properly
1203+
#
1204+
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_test);
1205+
INSERT INTO t1 VALUES ('a'),('A');
1206+
SELECT * FROM t1 WHERE a RLIKE 'a';
1207+
a
1208+
a
1209+
A
1210+
DROP TABLE t1;
1211+
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_test2_cs);
1212+
INSERT INTO t1 VALUES ('a'),('A');
1213+
SELECT * FROM t1 WHERE a RLIKE 'a';
1214+
a
1215+
a
1216+
DROP TABLE t1;

mysql-test/r/view.result

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6236,5 +6236,30 @@ i j
62366236
DROP VIEW v1;
62376237
DROP TABLE t1, t2, t3;
62386238
#
6239+
# MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1
6240+
# FOR UPDATE
6241+
#
6242+
CREATE TABLE t1 (a INT);
6243+
insert into t1 values (1),(2);
6244+
CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE;
6245+
SHOW CREATE VIEW v1;
6246+
View Create View character_set_client collation_connection
6247+
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` for update latin1 latin1_swedish_ci
6248+
select * from v1;
6249+
a
6250+
1
6251+
2
6252+
DROP VIEW v1;
6253+
CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE;
6254+
SHOW CREATE VIEW v1;
6255+
View Create View character_set_client collation_connection
6256+
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` lock in share mode latin1 latin1_swedish_ci
6257+
select * from v1;
6258+
a
6259+
1
6260+
2
6261+
DROP VIEW v1;
6262+
DROP TABLE t1;
6263+
#
62396264
# End of 10.2 tests
62406265
#

mysql-test/std_data/Index.xml renamed to mysql-test/std_data/ldml/Index.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,11 @@
318318

319319
</charset>
320320

321+
<charset name="ascii2">
322+
<collation name="ascii2_general_ci" id="320" flag="primary"/>
323+
<collation name="ascii2_bin" id="321" flag="binary"/>
324+
</charset>
325+
321326
<charset name="latin1">
322327
<family>Western</family>
323328
<description>cp1252 West European</description>
@@ -330,6 +335,7 @@
330335
<alias>latin1</alias>
331336
<collation name="latin1_test" id="99" order="test"/>
332337
<collation name="latin1_test2" id="332" order="test"/>
338+
<collation name="latin1_test2_cs" id="333"/>
333339
</charset>
334340

335341
<charset name="utf8">

mysql-test/std_data/ldml/ascii2.xml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?xml version='1.0' encoding="utf-8"?>
2+
3+
<charsets>
4+
5+
<charset name="ascii2">
6+
7+
<ctype>
8+
<map>
9+
00
10+
20 20 20 20 20 20 20 20 20 28 28 28 28 28 20 20
11+
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
12+
48 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
13+
84 84 84 84 84 84 84 84 84 84 10 10 10 10 10 10
14+
10 81 81 81 81 81 81 01 01 01 01 01 01 01 01 01
15+
01 01 01 01 01 01 01 01 01 01 01 10 10 10 10 10
16+
10 82 82 82 82 82 82 02 02 02 02 02 02 02 02 02
17+
02 02 02 02 02 02 02 02 02 02 02 10 10 10 10 20
18+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
19+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
21+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
22+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
23+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
24+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
25+
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
26+
</map>
27+
</ctype>
28+
29+
30+
<lower>
31+
<map>
32+
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
33+
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
34+
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
35+
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
36+
40 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
37+
70 71 72 73 74 75 76 77 78 79 7A 5B 5C 5D 5E 5F
38+
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
39+
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
40+
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
41+
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
42+
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
43+
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
44+
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
45+
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
46+
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
47+
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
48+
</map>
49+
</lower>
50+
51+
52+
<upper>
53+
<map>
54+
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
55+
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
56+
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
57+
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
58+
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
59+
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60+
60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
61+
50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F
62+
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
63+
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
64+
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
65+
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
66+
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
67+
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
68+
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
69+
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
70+
</map>
71+
</upper>
72+
73+
74+
<unicode>
75+
<map>
76+
0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
77+
0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F
78+
0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002A 002B 002C 002D 002E 002F
79+
0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003A 003B 003C 003D 003E 003F
80+
0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004A 004B 004C 004D 004E 004F
81+
0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005A 005B 005C 005D 005E 005F
82+
0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006A 006B 006C 006D 006E 006F
83+
0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E 007F
84+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
85+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
86+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
87+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
88+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
89+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
90+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
91+
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
92+
</map>
93+
</unicode>
94+
95+
96+
<collation name="ascii2_general_ci">
97+
<map>
98+
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
99+
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
100+
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
101+
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
102+
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
103+
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
104+
60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
105+
50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F
106+
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
107+
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
108+
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
109+
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
110+
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
111+
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
112+
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
113+
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
114+
</map>
115+
</collation>
116+
117+
<collation name="ascii2_bin" flag="binary"/>
118+
119+
</charset>
120+
121+
</charsets>

mysql-test/std_data/latin1.xml renamed to mysql-test/std_data/ldml/latin1.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,29 @@
152152
</map>
153153
</collation>
154154

155+
156+
<!-- This is a copy of latin1_general_cs -->
157+
<collation name="latin1_test2_cs">
158+
<map>
159+
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
160+
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
161+
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
162+
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
163+
40 41 51 53 57 5B 65 67 69 6B 75 77 79 7B 7D 81
164+
8F 91 93 95 98 9A A4 A6 A8 AA AF B3 B4 B5 B6 B7
165+
B8 42 52 54 58 5C 66 68 6A 6C 76 78 7A 7C 7E 82
166+
90 92 94 96 99 9B A5 A7 A9 AB B0 B9 BA BB BC BF
167+
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
168+
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
169+
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
170+
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
171+
43 45 47 49 4B 4D 4F 55 5D 5F 61 63 6D 6F 71 73
172+
59 7F 83 85 87 89 8B BD 8D 9C 9E A0 A2 AC B1 97
173+
44 46 48 4A 4C 4E 50 56 5E 60 62 64 6E 70 72 74
174+
5A 80 84 86 88 8A 8C BE 8E 9D 9F A1 A3 AD B2 AE
175+
</map>
176+
</collation>
177+
155178
</charset>
156179

157180
</charsets>

mysql-test/suite/innodb/r/innodb_ctype_ldml.result

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ with all Unicode character sets
55
set names utf8;
66
show variables like 'character_sets_dir%';
77
Variable_name Value
8-
character_sets_dir MYSQL_TEST_DIR/std_data/
8+
character_sets_dir MYSQL_TEST_DIR/std_data/ldml/
99
show collation like 'utf8_phone_ci';
1010
Collation Charset Id Default Compiled Sortlen
1111
utf8_phone_ci utf8 352 8
@@ -390,10 +390,13 @@ select "foo" = "foo " collate latin1_test;
390390
The following tests check that two-byte collation IDs work
391391
select * from information_schema.collations where id>256 and is_compiled<>'Yes' order by id;
392392
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
393+
ascii2_general_ci ascii2 320 Yes 1
394+
ascii2_bin ascii2 321 1
393395
utf8mb4_test_ci utf8mb4 326 8
394396
utf16_test_ci utf16 327 8
395397
utf8mb4_test_400_ci utf8mb4 328 8
396398
latin1_test2 latin1 332 1
399+
latin1_test2_cs latin1 333 1
397400
utf8_bengali_standard_ci utf8 336 8
398401
utf8_bengali_traditional_ci utf8 337 8
399402
utf8_implicit_weights_ci utf8 338 8
@@ -414,6 +417,7 @@ show collation like '%test%';
414417
Collation Charset Id Default Compiled Sortlen
415418
latin1_test latin1 99 Yes 1
416419
latin1_test2 latin1 332 1
420+
latin1_test2_cs latin1 333 1
417421
utf8_test_ci utf8 353 8
418422
ucs2_test_ci ucs2 358 8
419423
utf8mb4_test_ci utf8mb4 326 8
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
--character-sets-dir=$MYSQL_TEST_DIR/std_data/
1+
--character-sets-dir=$MYSQL_TEST_DIR/std_data/ldml/
22
--default-storage-engine=InnoDB
33

mysql-test/t/ctype_ldml-master.opt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
--character-sets-dir=$MYSQL_TEST_DIR/std_data/
1+
--character-sets-dir=$MYSQL_TEST_DIR/std_data/ldml/
22
--log-error=$MYSQLTEST_VARDIR/tmp/ctype_ldml_log.err

0 commit comments

Comments
 (0)