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