Skip to content
Permalink
Browse files

Multi-level collation in UCA, Thai sorting with contraction for UTF8.

  • Loading branch information
pruet committed May 26, 2016
1 parent 9c9747f commit fb35b9ad07f11c8beb24e579f365eca57bbda28a
@@ -101,7 +101,7 @@ extern MY_UNICASE_INFO my_unicase_unicode520;
*/
#define MY_UCA_MAX_WEIGHT_SIZE (8+1) /* Including 0 terminator */
#define MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE (2*8+1) /* Including 0 terminator */
#define MY_UCA_WEIGHT_LEVELS 1
#define MY_UCA_WEIGHT_LEVELS 2

typedef struct my_contraction_t
{
@@ -2706,6 +2706,261 @@ Z,z,Ź,ź,Ż,ż,Ž,ž
ǁ
ǂ
ǃ
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_thai_520_w2;
group_concat(c1 order by c1)
÷
×
A,a
Á,á
À,à
Ă,ă
Ắ,ắ
Ằ,ằ
Ẵ,ẵ
Ẳ,ẳ
Â,â
Ấ,ấ
Ầ,ầ
Ẫ,ẫ
Ẩ,ẩ
Ǎ,ǎ
Å,å
Ǻ,ǻ
Ä,ä
Ǟ,ǟ
Ã,ã
Ǡ,ǡ
Ą,ą
Ā,ā
Ả,ả
Ạ,ạ
Ặ,ặ
Ậ,ậ
AA,Aa,aA,aa
AE,Ae,aE,ae
Æ,æ
Ǽ,ǽ
Ǣ,ǣ
B,b
ƀ
Ɓ
Ƃ,ƃ
C,c
Ć,ć
Ĉ,ĉ
Č,č
Ċ,ċ
Ç,ç
CH,Ch,cH,ch
Ƈ,ƈ
D,d
Ď,ď
Đ,đ
Ð,ð
DZ,Dz,dZ,dz,DZ,Dz,dz
DŽ,Dž,dŽ,dž,DŽ,Dž,dž
Ɖ
Ɗ
Ƌ,ƌ
E,e
É,é
È,è
Ĕ,ĕ
Ê,ê
Ế,ế
Ề,ề
Ễ,ễ
Ể,ể
Ě,ě
Ë,ë
Ẽ,ẽ
Ė,ė
Ę,ę
Ē,ē
Ẻ,ẻ
Ẹ,ẹ
Ệ,ệ
Ǝ,ǝ
Ə
Ɛ
F,f
Ƒ,ƒ
G,g
Ǵ,ǵ
Ğ,ğ
Ĝ,ĝ
Ǧ,ǧ
Ġ,ġ
Ģ,ģ
Ǥ,ǥ
Ɠ
Ɣ
Ƣ,ƣ
H,h
Ĥ,ĥ
Ħ,ħ
ƕ,Ƕ
I,i
Í,í
Ì,ì
Ĭ,ĭ
Î,î
Ǐ,ǐ
Ï,ï
Ĩ,ĩ
İ
Į,į
Ī,ī
Ỉ,ỉ
Ị,ị
IJ,Ij,iJ,ij,IJ,ij
ı
Ɨ
Ɩ
J,j
Ĵ,ĵ
ǰ
K,k
Ǩ,ǩ
Ķ,ķ
Ƙ,ƙ
L,l
Ĺ,ĺ
Ľ,ľ
Ļ,ļ
Ł,ł
Ŀ,ŀ
LJ,Lj,lJ,lj,LJ,Lj,lj
LL,Ll,lL,ll
ƚ
ƛ
M,m
N,n
Ń,ń
Ǹ,ǹ
Ň,ň
Ñ,ñ
Ņ,ņ
NJ,Nj,nJ,nj,NJ,Nj,nj
Ɲ
ƞ
Ŋ,ŋ
O,o
Ó,ó
Ò,ò
Ŏ,ŏ
Ô,ô
Ố,ố
Ồ,ồ
Ỗ,ỗ
Ổ,ổ
Ǒ,ǒ
Ö,ö
Ő,ő
Õ,õ
Ø,ø
Ǿ,ǿ
Ǫ,ǫ
Ǭ,ǭ
Ō,ō
Ỏ,ỏ
Ơ,ơ
Ớ,ớ
Ờ,ờ
Ỡ,ỡ
Ở,ở
Ợ,ợ
Ọ,ọ
Ộ,ộ
OE,Oe,oE,oe
Œ,œ
Ɔ
Ɵ
P,p
Ƥ,ƥ
Q,q
ĸ
R,r
Ŕ,ŕ
Ř,ř
Ŗ,ŗ
RR,Rr,rR,rr
Ʀ
S,s
Ś,ś
Ŝ,ŝ
Š,š
Ş,ş
ſ
SS,Ss,sS,ss
ß
Ʃ
ƪ
T,t
Ť,ť
Ţ,ţ
ƾ
Ŧ,ŧ
ƫ
Ƭ,ƭ
Ʈ
U,u
Ú,ú
Ù,ù
Ŭ,ŭ
Û,û
Ǔ,ǔ
Ů,ů
Ü,ü
Ǘ,ǘ
Ǜ,ǜ
Ǚ,ǚ
Ǖ,ǖ
Ű,ű
Ũ,ũ
Ų,ų
Ū,ū
Ủ,ủ
Ư,ư
Ứ,ứ
Ừ,ừ
Ữ,ữ
Ử,ử
Ự,ự
Ụ,ụ
Ɯ
Ʊ
V,v
Ʋ
W,w
Ŵ,ŵ
X,x
Y,y
Ý,ý
Ŷ,ŷ
ÿ,Ÿ
Ƴ,ƴ
Z,z
Ź,ź
Ž,ž
Ż,ż
ƍ
Ƶ,ƶ
Ʒ
Ǯ,ǯ
Ƹ,ƹ
ƺ
Þ,þ
ƿ,Ƿ
ƻ
Ƨ,ƨ
Ƽ,ƽ
Ƅ,ƅ
ʼn
ǀ
ǁ
ǂ
ǃ
ALTER TABLE t1 CONVERT TO CHARACTER SET ucs2 COLLATE ucs2_bin;
SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_unicode_ci;
GROUP_CONCAT(c1 ORDER BY c1)
@@ -0,0 +1,86 @@
SET NAMES utf8;
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2)
PARTITION BY KEY(c1) PARTITIONS 3;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (c1)
PARTITIONS 3 */
INSERT INTO t1 VALUES ('A'),('À'),('Á'),('Â'),('Ã'),('Ä'),('Å');
INSERT INTO t1 VALUES ('B');
INSERT INTO t1 VALUES ('C');
INSERT INTO t1 VALUES ('D');
INSERT INTO t1 VALUES ('E');
INSERT INTO t1 VALUES ('F');
INSERT INTO t1 VALUES ('G');
INSERT INTO t1 VALUES ('H');
INSERT INTO t1 VALUES ('I');
INSERT INTO t1 VALUES ('J');
INSERT INTO t1 VALUES ('K');
INSERT INTO t1 VALUES ('L'),('Ĺ'),('Ļ'),('Ľ'),('Ŀ'),('Ł');
INSERT INTO t1 VALUES ('M');
INSERT INTO t1 VALUES ('N');
INSERT INTO t1 VALUES ('O'),('Ò'),('Ó'),('Ô'),('Õ'),('Ö'),('Ø');
INSERT INTO t1 VALUES ('P');
INSERT INTO t1 VALUES ('Q');
INSERT INTO t1 VALUES ('R');
INSERT INTO t1 VALUES ('S');
INSERT INTO t1 VALUES ('T');
INSERT INTO t1 VALUES ('U');
INSERT INTO t1 VALUES ('V');
INSERT INTO t1 VALUES ('W');
INSERT INTO t1 VALUES ('X');
INSERT INTO t1 VALUES ('Y');
INSERT INTO t1 VALUES ('Z');
SELECT * FROM t1 PARTITION (p0) ORDER BY c1;
c1
J
K
L
Ĺ
Ľ
Ļ
Ł
Ŀ
M
Q
R
T
V
X
SELECT * FROM t1 PARTITION (p1) ORDER BY c1;
c1
A
Á
À
Â
Å
Ä
Ã
D
E
F
G
I
N
S
U
W
Z
SELECT * FROM t1 PARTITION (p2) ORDER BY c1;
c1
B
C
H
O
Ó
Ò
Ô
Ö
Õ
Ø
P
Y
DROP TABLE t1;

0 comments on commit fb35b9a

Please sign in to comment.
You can’t perform that action at this time.