~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
--source include/have_ujis.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
--enable_warnings
15
16
#
17
# Test TRIM() function with Japanese characters ujis encoding
18
#
19
20
SET NAMES ujis;
21
SET character_set_database = ujis;
22
23
CREATE TABLE `£Ô£±` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = innodb;
24
CREATE TABLE `£Ô£²` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = innodb;
25
CREATE TABLE `£Ô£³` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = innodb;
26
CREATE TABLE `£Ô£Ž` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = myisam;
27
CREATE TABLE `£Ô£µ` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = myisam;
28
CREATE TABLE `£Ô£¶` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = myisam;
29
CREATE TABLE `£Ô£·` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = heap;
30
CREATE TABLE `£Ô£ž` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = heap;
31
CREATE TABLE `£Ô£¹` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = heap;
32
CREATE TABLE `£Ô£±£°` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = bdb;
33
CREATE TABLE `£Ô£±£±` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = bdb;
34
CREATE TABLE `£Ô£±£²` (`£Ã£±` char(12), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = bdb;
35
36
# Nothing to trim
37
INSERT INTO `£Ô£±` VALUES ('Ž±Ž²Ž³ŽŽŽµ');
38
# Test data for TRIM(TRAILING [remstr] FROM str)
39
INSERT INTO `£Ô£±` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶');
40
INSERT INTO `£Ô£±` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶');
41
INSERT INTO `£Ô£±` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
42
# Test data for TRIM(LEADING [remstr] FROM str)
43
INSERT INTO `£Ô£±` VALUES ('Ž¶Ž±Ž²Ž³ŽŽŽµ');
44
INSERT INTO `£Ô£±` VALUES ('Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
45
INSERT INTO `£Ô£±` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
46
# Test data for TRIM(BOTH [remstr] FROM str)
47
INSERT INTO `£Ô£±` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
48
# Test data for TRIM without [remstr] (remove spaces) 
49
INSERT INTO `£Ô£±` VALUES ('   Ž±Ž²Ž³ŽŽŽµ   ');
50
INSERT INTO `£Ô£²` VALUES ('€¢€€€Š€š€ª');
51
INSERT INTO `£Ô£²` VALUES ('€¢€€€Š€š€ª€«');
52
INSERT INTO `£Ô£²` VALUES ('€¢€€€Š€š€ª€«€«');
53
INSERT INTO `£Ô£²` VALUES ('€¢€€€Š€š€ª€«€«€«');
54
INSERT INTO `£Ô£²` VALUES ('€«€¢€€€Š€š€ª');
55
INSERT INTO `£Ô£²` VALUES ('€«€«€¢€€€Š€š€ª');
56
INSERT INTO `£Ô£²` VALUES ('€«€«€«€¢€€€Š€š€ª');
57
INSERT INTO `£Ô£²` VALUES ('€«€«€«€¢€€€Š€š€ª€«€«€«');
58
INSERT INTO `£Ô£²` VALUES ('   €¢€€€Š€š€ª   ');
59
INSERT INTO `£Ô£³` VALUES ('í܏íݏíޏíߏíà');
60
INSERT INTO `£Ô£³` VALUES ('í܏íݏíޏíߏíà°¡');
61
INSERT INTO `£Ô£³` VALUES ('í܏íݏíޏíߏíà°¡°¡');
62
INSERT INTO `£Ô£³` VALUES ('í܏íݏíޏíߏíà°¡°¡°¡');
63
INSERT INTO `£Ô£³` VALUES ('°¡í܏íݏíޏíߏíà');
64
INSERT INTO `£Ô£³` VALUES ('°¡°¡í܏íݏíޏíߏíà');
65
INSERT INTO `£Ô£³` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà');
66
INSERT INTO `£Ô£³` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà°¡°¡°¡');
67
INSERT INTO `£Ô£³` VALUES ('   í܏íݏíޏíߏíà   ');
68
69
INSERT INTO `£Ô£Ž` VALUES ('Ž±Ž²Ž³ŽŽŽµ');
70
INSERT INTO `£Ô£Ž` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶');
71
INSERT INTO `£Ô£Ž` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶');
72
INSERT INTO `£Ô£Ž` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
73
INSERT INTO `£Ô£Ž` VALUES ('Ž¶Ž±Ž²Ž³ŽŽŽµ');
74
INSERT INTO `£Ô£Ž` VALUES ('Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
75
INSERT INTO `£Ô£Ž` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
76
INSERT INTO `£Ô£Ž` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
77
INSERT INTO `£Ô£Ž` VALUES ('   Ž±Ž²Ž³ŽŽŽµ   ');
78
INSERT INTO `£Ô£µ` VALUES ('€¢€€€Š€š€ª');
79
INSERT INTO `£Ô£µ` VALUES ('€¢€€€Š€š€ª€«');
80
INSERT INTO `£Ô£µ` VALUES ('€¢€€€Š€š€ª€«€«');
81
INSERT INTO `£Ô£µ` VALUES ('€¢€€€Š€š€ª€«€«€«');
82
INSERT INTO `£Ô£µ` VALUES ('€«€¢€€€Š€š€ª');
83
INSERT INTO `£Ô£µ` VALUES ('€«€«€¢€€€Š€š€ª');
84
INSERT INTO `£Ô£µ` VALUES ('€«€«€«€¢€€€Š€š€ª');
85
INSERT INTO `£Ô£µ` VALUES ('€«€«€«€¢€€€Š€š€ª€«€«€«');
86
INSERT INTO `£Ô£µ` VALUES ('   €¢€€€Š€š€ª   ');
87
INSERT INTO `£Ô£¶` VALUES ('í܏íݏíޏíߏíà');
88
INSERT INTO `£Ô£¶` VALUES ('í܏íݏíޏíߏíà°¡');
89
INSERT INTO `£Ô£¶` VALUES ('í܏íݏíޏíߏíà°¡°¡');
90
INSERT INTO `£Ô£¶` VALUES ('í܏íݏíޏíߏíà°¡°¡°¡');
91
INSERT INTO `£Ô£¶` VALUES ('°¡í܏íݏíޏíߏíà');
92
INSERT INTO `£Ô£¶` VALUES ('°¡°¡í܏íݏíޏíߏíà');
93
INSERT INTO `£Ô£¶` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà');
94
INSERT INTO `£Ô£¶` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà°¡°¡°¡');
95
INSERT INTO `£Ô£¶` VALUES ('   í܏íݏíޏíߏíà   ');
96
97
INSERT INTO `£Ô£·` VALUES ('Ž±Ž²Ž³ŽŽŽµ');
98
INSERT INTO `£Ô£·` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶');
99
INSERT INTO `£Ô£·` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶');
100
INSERT INTO `£Ô£·` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
101
INSERT INTO `£Ô£·` VALUES ('Ž¶Ž±Ž²Ž³ŽŽŽµ');
102
INSERT INTO `£Ô£·` VALUES ('Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
103
INSERT INTO `£Ô£·` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
104
INSERT INTO `£Ô£·` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
105
INSERT INTO `£Ô£·` VALUES ('   Ž±Ž²Ž³ŽŽŽµ   ');
106
INSERT INTO `£Ô£ž` VALUES ('€¢€€€Š€š€ª');
107
INSERT INTO `£Ô£ž` VALUES ('€¢€€€Š€š€ª€«');
108
INSERT INTO `£Ô£ž` VALUES ('€¢€€€Š€š€ª€«€«');
109
INSERT INTO `£Ô£ž` VALUES ('€¢€€€Š€š€ª€«€«€«');
110
INSERT INTO `£Ô£ž` VALUES ('€«€¢€€€Š€š€ª');
111
INSERT INTO `£Ô£ž` VALUES ('€«€«€¢€€€Š€š€ª');
112
INSERT INTO `£Ô£ž` VALUES ('€«€«€«€¢€€€Š€š€ª');
113
INSERT INTO `£Ô£ž` VALUES ('€«€«€«€¢€€€Š€š€ª€«€«€«');
114
INSERT INTO `£Ô£ž` VALUES ('   €¢€€€Š€š€ª   ');
115
INSERT INTO `£Ô£¹` VALUES ('í܏íݏíޏíߏíà');
116
INSERT INTO `£Ô£¹` VALUES ('í܏íݏíޏíߏíà°¡');
117
INSERT INTO `£Ô£¹` VALUES ('í܏íݏíޏíߏíà°¡°¡');
118
INSERT INTO `£Ô£¹` VALUES ('í܏íݏíޏíߏíà°¡°¡°¡');
119
INSERT INTO `£Ô£¹` VALUES ('°¡í܏íݏíޏíߏíà');
120
INSERT INTO `£Ô£¹` VALUES ('°¡°¡í܏íݏíޏíߏíà');
121
INSERT INTO `£Ô£¹` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà');
122
INSERT INTO `£Ô£¹` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà°¡°¡°¡');
123
INSERT INTO `£Ô£¹` VALUES ('   í܏íݏíޏíߏíà   ');
124
125
INSERT INTO `£Ô£±£°` VALUES ('Ž±Ž²Ž³ŽŽŽµ');
126
INSERT INTO `£Ô£±£°` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶');
127
INSERT INTO `£Ô£±£°` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶');
128
INSERT INTO `£Ô£±£°` VALUES ('Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
129
INSERT INTO `£Ô£±£°` VALUES ('Ž¶Ž±Ž²Ž³ŽŽŽµ');
130
INSERT INTO `£Ô£±£°` VALUES ('Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
131
INSERT INTO `£Ô£±£°` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµ');
132
INSERT INTO `£Ô£±£°` VALUES ('Ž¶Ž¶Ž¶Ž±Ž²Ž³ŽŽŽµŽ¶Ž¶Ž¶');
133
INSERT INTO `£Ô£±£°` VALUES ('   Ž±Ž²Ž³ŽŽŽµ   ');
134
INSERT INTO `£Ô£±£±` VALUES ('€¢€€€Š€š€ª');
135
INSERT INTO `£Ô£±£±` VALUES ('€¢€€€Š€š€ª€«');
136
INSERT INTO `£Ô£±£±` VALUES ('€¢€€€Š€š€ª€«€«');
137
INSERT INTO `£Ô£±£±` VALUES ('€¢€€€Š€š€ª€«€«€«');
138
INSERT INTO `£Ô£±£±` VALUES ('€«€¢€€€Š€š€ª');
139
INSERT INTO `£Ô£±£±` VALUES ('€«€«€¢€€€Š€š€ª');
140
INSERT INTO `£Ô£±£±` VALUES ('€«€«€«€¢€€€Š€š€ª');
141
INSERT INTO `£Ô£±£±` VALUES ('€«€«€«€¢€€€Š€š€ª€«€«€«');
142
INSERT INTO `£Ô£±£±` VALUES ('   €¢€€€Š€š€ª   ');
143
INSERT INTO `£Ô£±£²` VALUES ('í܏íݏíޏíߏíà');
144
INSERT INTO `£Ô£±£²` VALUES ('í܏íݏíޏíߏíà°¡');
145
INSERT INTO `£Ô£±£²` VALUES ('í܏íݏíޏíߏíà°¡°¡');
146
INSERT INTO `£Ô£±£²` VALUES ('í܏íݏíޏíߏíà°¡°¡°¡');
147
INSERT INTO `£Ô£±£²` VALUES ('°¡í܏íݏíޏíߏíà');
148
INSERT INTO `£Ô£±£²` VALUES ('°¡°¡í܏íݏíޏíߏíà');
149
INSERT INTO `£Ô£±£²` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà');
150
INSERT INTO `£Ô£±£²` VALUES ('°¡°¡°¡í܏íݏíޏíߏíà°¡°¡°¡');
151
INSERT INTO `£Ô£±£²` VALUES ('   í܏íݏíޏíߏíà   ');
152
153
#InnoDB
154
SELECT `£Ã£±`,TRIM(TRAILING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£±`;
155
SELECT `£Ã£±`,TRIM(LEADING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£±`;
156
SELECT `£Ã£±`,TRIM(BOTH 'Ž¶' FROM `£Ã£±`) FROM `£Ô£±`;
157
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£±`;
158
SELECT `£Ã£±`,TRIM(TRAILING '€«' FROM `£Ã£±`) FROM `£Ô£²`;
159
SELECT `£Ã£±`,TRIM(LEADING '€«' FROM `£Ã£±`) FROM `£Ô£²`;
160
SELECT `£Ã£±`,TRIM(BOTH '€«' FROM `£Ã£±`) FROM `£Ô£²`;
161
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£²`;
162
SELECT `£Ã£±`,TRIM(TRAILING '°¡'FROM `£Ã£±`) FROM `£Ô£³`;
163
SELECT `£Ã£±`,TRIM(LEADING '°¡' FROM `£Ã£±`) FROM `£Ô£³`;
164
SELECT `£Ã£±`,TRIM(BOTH '°¡' FROM `£Ã£±`) FROM `£Ô£³`;
165
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£³`;
166
167
#MyISAM
168
SELECT `£Ã£±`,TRIM(TRAILING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£Ž`;
169
SELECT `£Ã£±`,TRIM(LEADING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£Ž`;
170
SELECT `£Ã£±`,TRIM(BOTH 'Ž¶' FROM `£Ã£±`) FROM `£Ô£Ž`;
171
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£Ž`;
172
SELECT `£Ã£±`,TRIM(TRAILING '€«' FROM `£Ã£±`) FROM `£Ô£µ`;
173
SELECT `£Ã£±`,TRIM(LEADING '€«' FROM `£Ã£±`) FROM `£Ô£µ`;
174
SELECT `£Ã£±`,TRIM(BOTH '€«' FROM `£Ã£±`) FROM `£Ô£µ`;
175
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£µ`;
176
SELECT `£Ã£±`,TRIM(TRAILING '°¡' FROM `£Ã£±`) FROM `£Ô£¶`;
177
SELECT `£Ã£±`,TRIM(LEADING '°¡' FROM `£Ã£±`) FROM `£Ô£¶`;
178
SELECT `£Ã£±`,TRIM(BOTH '°¡' FROM `£Ã£±`) FROM `£Ô£¶`;
179
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£¶`;
180
181
#HEAP
182
SELECT `£Ã£±`,TRIM(TRAILING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£·`;
183
SELECT `£Ã£±`,TRIM(LEADING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£·`;
184
SELECT `£Ã£±`,TRIM(BOTH 'Ž¶' FROM `£Ã£±`) FROM `£Ô£·`;
185
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£·`;
186
SELECT `£Ã£±`,TRIM(TRAILING '€«' FROM `£Ã£±`) FROM `£Ô£ž`;
187
SELECT `£Ã£±`,TRIM(LEADING '€«' FROM `£Ã£±`) FROM `£Ô£ž`;
188
SELECT `£Ã£±`,TRIM(BOTH '€«' FROM `£Ã£±`) FROM `£Ô£ž`;
189
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£ž`;
190
SELECT `£Ã£±`,TRIM(TRAILING '°¡' FROM `£Ã£±`) FROM `£Ô£¹`;
191
SELECT `£Ã£±`,TRIM(LEADING '°¡' FROM `£Ã£±`) FROM `£Ô£¹`;
192
SELECT `£Ã£±`,TRIM(BOTH '°¡' FROM `£Ã£±`) FROM `£Ô£¹`;
193
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£¹`;
194
195
#BDB
196
SELECT `£Ã£±`,TRIM(TRAILING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£±£°`;
197
SELECT `£Ã£±`,TRIM(LEADING 'Ž¶' FROM `£Ã£±`) FROM `£Ô£±£°`;
198
SELECT `£Ã£±`,TRIM(BOTH 'Ž¶' FROM `£Ã£±`) FROM `£Ô£±£°`;
199
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£±£°`;
200
SELECT `£Ã£±`,TRIM(TRAILING '€«' FROM `£Ã£±`) FROM `£Ô£±£±`;
201
SELECT `£Ã£±`,TRIM(LEADING '€«' FROM `£Ã£±`) FROM `£Ô£±£±`;
202
SELECT `£Ã£±`,TRIM(BOTH '€«' FROM `£Ã£±`) FROM `£Ô£±£±`;
203
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£±£±`;
204
SELECT `£Ã£±`,TRIM(TRAILING '°¡' FROM `£Ã£±`) FROM `£Ô£±£²`;
205
SELECT `£Ã£±`,TRIM(LEADING '°¡' FROM `£Ã£±`) FROM `£Ô£±£²`;
206
SELECT `£Ã£±`,TRIM(BOTH '°¡' FROM `£Ã£±`) FROM `£Ô£±£²`;
207
SELECT `£Ã£±`,TRIM(`£Ã£±`) FROM `£Ô£±£²`;
208
209
DROP TABLE `£Ô£±`;
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 `£Ô£±£²`;