~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
--source include/have_ucs2.inc
2
3
--disable_warnings
4
drop table if exists `£Ô£±`;
5
drop table if exists `£Ô£²`;
6
drop table if exists `£Ô£³`;
7
drop table if exists `£Ô£Ž`;
8
drop table if exists `£Ô£µ`;
9
drop table if exists `£Ô£¶`;
10
drop table if exists `£Ô£·`;
11
drop table if exists `£Ô£ž`;
12
drop table if exists `£Ô£¹`;
13
drop table if exists `£Ô£±£°`;
14
drop table if exists `£Ô£±£±`;
15
drop table if exists `£Ô£±£²`;
16
--enable_warnings
17
18
#
19
# Test CHARSET() function with Japanese characters in ucs2 encoding  
20
#
21
22
SET NAMES ujis;
23
SET character_set_database = ucs2;
24
CREATE TABLE `£Ô£±` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = innodb;
25
CREATE TABLE `£Ô£²` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = innodb;
26
CREATE TABLE `£Ô£³` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = innodb;
27
CREATE TABLE `£Ô£Ž` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = myisam;
28
CREATE TABLE `£Ô£µ` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = myisam;
29
CREATE TABLE `£Ô£¶` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = myisam;
30
CREATE TABLE `£Ô£·` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = heap;
31
CREATE TABLE `£Ô£ž` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = heap;
32
CREATE TABLE `£Ô£¹` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = heap;
33
CREATE TABLE `£Ô£±£°` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = bdb;
34
CREATE TABLE `£Ô£±£±` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = bdb;
35
CREATE TABLE `£Ô£±£²` (`£Ã£±` char(20)) DEFAULT CHARSET = ucs2 engine = bdb;
36
37
#Insert the following data in each table
38
# jisx0201 hankaku-katakana data
39
# jisx0208 data
40
# jisx0212 supplemental character data
41
42
INSERT INTO `£Ô£±` VALUES
43
 ('PQRSTUVWXYZ[\\]^_')
44
,(' Ž¡Ž¢Ž£Ž€Ž¥ŽŠŽ§ŽšŽ©ŽªŽ«Ž¬Ž­Ž®Ž¯')
45
,('Ž°Ž±Ž²Ž³ŽŽŽµŽ¶Ž·ŽžŽ¹ŽºŽ»ŽŒŽœŽŸŽ¿')
46
,('ŽÀŽÁŽÂŽÃŽÄŽÅŽÆŽÇŽÈŽÉŽÊŽËŽÌŽÍŽÎŽÏ')
47
,('ŽÐŽÑŽÒŽÓŽÔŽÕŽÖŽ×ŽØŽÙŽÚŽÛŽÜŽÝŽÞŽß');
48
49
INSERT INTO `£Ô£²` VALUES
50
 ('¡Ž¡µ¡¶¡·¡ž¡¹¡º¡»¡Œ¡œ¡Ÿ¡¿¡À¡Á¡Â¡Ã¡Ä¡Å¡Æ¡Ç')
51
,('¡È¡É¡Ê¡Ë¡Ì¡Í¡Î¡Ï¡Ð¡Ñ¡Ò¡Ó¡Ô¡Õ¡Ö¡×¡Ø¡Ù¡Ú¡Û')
52
,('¡Š€¡€¢€£€€€¥€Š€§€š€©€ª€«€¬€­€®€¯€°€±€²€³')
53
,('¡Š¥¡¥¢¥£¥€¥¥¥Š¥§¥š¥©¥ª¥«¥¬¥­¥®¥¯¥°¥±¥²¥³')
54
,('¡Š°¡°¢°£°€°¥°Š°§°š°©°ª°«°¬°­°®°¯°°°±°²°³')
55
,('¡ŠÐ¡Ð¢Ð£Ð€Ð¥ÐŠÐ§ÐšÐ©ÐªÐ«Ð¬Ð­Ð®Ð¯Ð°Ð±Ð²Ð³')
56
,('¡Šó¡ó¢ó£ó€ó¥óŠó§óšó©óªó«ó¬ó­ó®ó¯ó°ó±ó²ó³');
57
58
INSERT INTO `£Ô£³` VALUES
59
 ('¡Š¢µ¢¶¢·¢ž¢¹¡Š¡Š¡Š¡Š¡Š¡Š¡Š¡Š¢Â¢Ã¢Ä¡Š¡Š¡Š')
60
,('°Ž°µ°¶°·°ž°¹°º°»°Œ°œ°Ÿ°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç')
61
,('°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û')
62
,('°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï')
63
,('¡Ší¡í¢í£í€í¥íŠí§íší©íªí«í¬í­í®í¯í°í±í²í³')
64
,('íŽíµí¶í·íží¹íºí»íŒíœíŸí¿íÀíÁííÏíďíŏíƏíÇ')
65
,('íȏíɏíʏíˏí̏í͏íΏíϏíЏíяíҏíӏíԏíՏí֏í׏í؏íُíڏíÛ');
66
67
INSERT INTO `£Ô£Ž` VALUES
68
 ('PQRSTUVWXYZ[\\]^_')
69
,(' Ž¡Ž¢Ž£Ž€Ž¥ŽŠŽ§ŽšŽ©ŽªŽ«Ž¬Ž­Ž®Ž¯')
70
,('Ž°Ž±Ž²Ž³ŽŽŽµŽ¶Ž·ŽžŽ¹ŽºŽ»ŽŒŽœŽŸŽ¿')
71
,('ŽÀŽÁŽÂŽÃŽÄŽÅŽÆŽÇŽÈŽÉŽÊŽËŽÌŽÍŽÎŽÏ')
72
,('ŽÐŽÑŽÒŽÓŽÔŽÕŽÖŽ×ŽØŽÙŽÚŽÛŽÜŽÝŽÞŽß');
73
74
INSERT INTO `£Ô£µ` VALUES
75
 ('¡Ž¡µ¡¶¡·¡ž¡¹¡º¡»¡Œ¡œ¡Ÿ¡¿¡À¡Á¡Â¡Ã¡Ä¡Å¡Æ¡Ç')
76
,('¡È¡É¡Ê¡Ë¡Ì¡Í¡Î¡Ï¡Ð¡Ñ¡Ò¡Ó¡Ô¡Õ¡Ö¡×¡Ø¡Ù¡Ú¡Û')
77
,('¡Š€¡€¢€£€€€¥€Š€§€š€©€ª€«€¬€­€®€¯€°€±€²€³')
78
,('¡Š¥¡¥¢¥£¥€¥¥¥Š¥§¥š¥©¥ª¥«¥¬¥­¥®¥¯¥°¥±¥²¥³')
79
,('¡Š°¡°¢°£°€°¥°Š°§°š°©°ª°«°¬°­°®°¯°°°±°²°³')
80
,('¡ŠÐ¡Ð¢Ð£Ð€Ð¥ÐŠÐ§ÐšÐ©ÐªÐ«Ð¬Ð­Ð®Ð¯Ð°Ð±Ð²Ð³')
81
,('¡Šó¡ó¢ó£ó€ó¥óŠó§óšó©óªó«ó¬ó­ó®ó¯ó°ó±ó²ó³');
82
83
INSERT INTO `£Ô£¶` VALUES
84
 ('¡Š¢µ¢¶¢·¢ž¢¹¡Š¡Š¡Š¡Š¡Š¡Š¡Š¡Š¢Â¢Ã¢Ä¡Š¡Š¡Š')
85
,('°Ž°µ°¶°·°ž°¹°º°»°Œ°œ°Ÿ°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç')
86
,('°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û')
87
,('°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï')
88
,('¡Ší¡í¢í£í€í¥íŠí§íší©íªí«í¬í­í®í¯í°í±í²í³')
89
,('íŽíµí¶í·íží¹íºí»íŒíœíŸí¿íÀíÁííÏíďíŏíƏíÇ')
90
,('íȏíɏíʏíˏí̏í͏íΏíϏíЏíяíҏíӏíԏíՏí֏í׏í؏íُíڏíÛ');
91
92
INSERT INTO `£Ô£·` VALUES
93
 ('PQRSTUVWXYZ[\\]^_')
94
,(' Ž¡Ž¢Ž£Ž€Ž¥ŽŠŽ§ŽšŽ©ŽªŽ«Ž¬Ž­Ž®Ž¯')
95
,('Ž°Ž±Ž²Ž³ŽŽŽµŽ¶Ž·ŽžŽ¹ŽºŽ»ŽŒŽœŽŸŽ¿')
96
,('ŽÀŽÁŽÂŽÃŽÄŽÅŽÆŽÇŽÈŽÉŽÊŽËŽÌŽÍŽÎŽÏ')
97
,('ŽÐŽÑŽÒŽÓŽÔŽÕŽÖŽ×ŽØŽÙŽÚŽÛŽÜŽÝŽÞŽß');
98
99
INSERT INTO `£Ô£ž` VALUES
100
 ('¡Ž¡µ¡¶¡·¡ž¡¹¡º¡»¡Œ¡œ¡Ÿ¡¿¡À¡Á¡Â¡Ã¡Ä¡Å¡Æ¡Ç')
101
,('¡È¡É¡Ê¡Ë¡Ì¡Í¡Î¡Ï¡Ð¡Ñ¡Ò¡Ó¡Ô¡Õ¡Ö¡×¡Ø¡Ù¡Ú¡Û')
102
,('¡Š€¡€¢€£€€€¥€Š€§€š€©€ª€«€¬€­€®€¯€°€±€²€³')
103
,('¡Š¥¡¥¢¥£¥€¥¥¥Š¥§¥š¥©¥ª¥«¥¬¥­¥®¥¯¥°¥±¥²¥³')
104
,('¡Š°¡°¢°£°€°¥°Š°§°š°©°ª°«°¬°­°®°¯°°°±°²°³')
105
,('¡ŠÐ¡Ð¢Ð£Ð€Ð¥ÐŠÐ§ÐšÐ©ÐªÐ«Ð¬Ð­Ð®Ð¯Ð°Ð±Ð²Ð³')
106
,('¡Šó¡ó¢ó£ó€ó¥óŠó§óšó©óªó«ó¬ó­ó®ó¯ó°ó±ó²ó³');
107
108
INSERT INTO `£Ô£¹` VALUES
109
 ('¡Š¢µ¢¶¢·¢ž¢¹¡Š¡Š¡Š¡Š¡Š¡Š¡Š¡Š¢Â¢Ã¢Ä¡Š¡Š¡Š')
110
,('°Ž°µ°¶°·°ž°¹°º°»°Œ°œ°Ÿ°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç')
111
,('°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û')
112
,('°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï')
113
,('¡Ší¡í¢í£í€í¥íŠí§íší©íªí«í¬í­í®í¯í°í±í²í³')
114
,('íŽíµí¶í·íží¹íºí»íŒíœíŸí¿íÀíÁííÏíďíŏíƏíÇ')
115
,('íȏíɏíʏíˏí̏í͏íΏíϏíЏíяíҏíӏíԏíՏí֏í׏í؏íُíڏíÛ');
116
117
INSERT INTO `£Ô£±£°` VALUES
118
 ('PQRSTUVWXYZ[\\]^_')
119
,(' Ž¡Ž¢Ž£Ž€Ž¥ŽŠŽ§ŽšŽ©ŽªŽ«Ž¬Ž­Ž®Ž¯')
120
,('Ž°Ž±Ž²Ž³ŽŽŽµŽ¶Ž·ŽžŽ¹ŽºŽ»ŽŒŽœŽŸŽ¿')
121
,('ŽÀŽÁŽÂŽÃŽÄŽÅŽÆŽÇŽÈŽÉŽÊŽËŽÌŽÍŽÎŽÏ')
122
,('ŽÐŽÑŽÒŽÓŽÔŽÕŽÖŽ×ŽØŽÙŽÚŽÛŽÜŽÝŽÞŽß');
123
124
INSERT INTO `£Ô£±£±` VALUES
125
 ('¡Ž¡µ¡¶¡·¡ž¡¹¡º¡»¡Œ¡œ¡Ÿ¡¿¡À¡Á¡Â¡Ã¡Ä¡Å¡Æ¡Ç')
126
,('¡È¡É¡Ê¡Ë¡Ì¡Í¡Î¡Ï¡Ð¡Ñ¡Ò¡Ó¡Ô¡Õ¡Ö¡×¡Ø¡Ù¡Ú¡Û')
127
,('¡Š€¡€¢€£€€€¥€Š€§€š€©€ª€«€¬€­€®€¯€°€±€²€³')
128
,('¡Š¥¡¥¢¥£¥€¥¥¥Š¥§¥š¥©¥ª¥«¥¬¥­¥®¥¯¥°¥±¥²¥³')
129
,('¡Š°¡°¢°£°€°¥°Š°§°š°©°ª°«°¬°­°®°¯°°°±°²°³')
130
,('¡ŠÐ¡Ð¢Ð£Ð€Ð¥ÐŠÐ§ÐšÐ©ÐªÐ«Ð¬Ð­Ð®Ð¯Ð°Ð±Ð²Ð³')
131
,('¡Šó¡ó¢ó£ó€ó¥óŠó§óšó©óªó«ó¬ó­ó®ó¯ó°ó±ó²ó³');
132
133
INSERT INTO `£Ô£±£²` VALUES
134
 ('¡Š¢µ¢¶¢·¢ž¢¹¡Š¡Š¡Š¡Š¡Š¡Š¡Š¡Š¢Â¢Ã¢Ä¡Š¡Š¡Š')
135
,('°Ž°µ°¶°·°ž°¹°º°»°Œ°œ°Ÿ°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç')
136
,('°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û')
137
,('°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï')
138
,('¡Ší¡í¢í£í€í¥íŠí§íší©íªí«í¬í­í®í¯í°í±í²í³')
139
,('íŽíµí¶í·íží¹íºí»íŒíœíŸí¿íÀíÁííÏíďíŏíƏíÇ')
140
,('íȏíɏíʏíˏí̏í͏íΏíϏíЏíяíҏíӏíԏíՏí֏í׏í؏íُíڏíÛ');
141
 
142
#InnoDB
143
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£±`;
144
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£²`;
145
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£³`;
146
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£±`;
147
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£±`;
148
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£±`;
149
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£±`;
150
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£²`;
151
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£²`;
152
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£²`;
153
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£²`;
154
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£³`;
155
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£³`;
156
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£³`;
157
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£³`;
158
159
#MyISAM
160
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£Ž`;
161
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£µ`;
162
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£¶`;
163
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£Ž`;
164
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£Ž`;
165
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£Ž`;
166
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£Ž`;
167
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£µ`;
168
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£µ`;
169
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£µ`;
170
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£µ`;
171
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£¶`;
172
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£¶`;
173
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£¶`;
174
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£¶`;
175
176
#Heap
177
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£·`;
178
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£ž`;
179
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£¹`;
180
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£·`;
181
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£·`;
182
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£·`;
183
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£·`;
184
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£ž`;
185
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£ž`;
186
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£ž`;
187
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£ž`;
188
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£¹`;
189
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£¹`;
190
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£¹`;
191
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£¹`;
192
193
#BDB
194
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£±£°`;
195
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£±£±`;
196
SELECT DISTINCT CHARSET(`£Ã£±`) FROM `£Ô£±£²`;
197
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£±£°`;
198
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£±£°`;
199
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£±£°`;
200
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£±£°`;
201
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£±£±`;
202
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£±£±`;
203
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£±£±`;
204
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£±£±`;
205
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING utf8)) FROM `£Ô£±£²`;
206
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ucs2)) FROM `£Ô£±£²`;
207
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING sjis)) FROM `£Ô£±£²`;
208
SELECT DISTINCT CHARSET(CONVERT(`£Ã£±` USING ujis)) FROM `£Ô£±£²`;
209
210
drop table `£Ô£±`;
211
drop table `£Ô£²`;
212
drop table `£Ô£³`;
213
drop table `£Ô£Ž`;
214
drop table `£Ô£µ`;
215
drop table `£Ô£¶`;
216
drop table `£Ô£·`;
217
drop table `£Ô£ž`;
218
drop table `£Ô£¹`;
219
drop table `£Ô£±£°`;
220
drop table `£Ô£±£±`;
221
drop table `£Ô£±£²`;