MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ctype_german.inc
1 --echo "BEGIN ctype_german.inc"
2 #
3 # Bug #27877 incorrect german order in utf8_general_ci
4 #
5 # Testing if "SHARP S" is equal to "S",
6 # like in latin1_german1_ci, utf8_general_ci, ucs2_general_ci
7 # Or if "SHART S" is equal to "SS",
8 # like in latin1_german2_ci, utf8_unicode_ci, ucs2_unicode_ci
9 #
10 # Also testing A-uml, O-uml, U-uml
11 #
12 
13 --disable_warnings
14 drop table if exists t1;
15 --enable_warnings
16 
17 #
18 # Create a table with a varchar(x) column,
19 # using current values of
20 # @@character_set_connection and @@collation_connection.
21 #
22 
23 create table t1 as select repeat(' ', 64) as s1;
24 select collation(s1) from t1;
25 delete from t1;
26 
27 #
28 # Populate data
29 #
30 
31 INSERT INTO t1 VALUES ('ud'),('uf');
32 INSERT INTO t1 VALUES ('od'),('of');
33 INSERT INTO t1 VALUES ('e');
34 INSERT INTO t1 VALUES ('ad'),('af');
35 
36 insert into t1 values ('a'),('ae'),(_latin1 0xE4);
37 insert into t1 values ('o'),('oe'),(_latin1 0xF6);
38 insert into t1 values ('s'),('ss'),(_latin1 0xDF);
39 insert into t1 values ('u'),('ue'),(_latin1 0xFC);
40 
41 # LIGATURE AE
42 INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6);
43 # LIGATURE OE
44 INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C);
45 
46 #
47 # Check order
48 #
49 select s1, hex(s1) from t1 order by s1, binary s1;
50 select group_concat(s1 order by binary s1) from t1 group by s1;
51 
52 SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1);
53 SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1);
54 
55 drop table t1;
56 
57 --echo "END ctype_german.inc"