~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
--character_set sjis
--disable_warnings
drop table if exists `‚s‚P`;
drop table if exists `‚s‚Q`;
drop table if exists `‚s‚R`;
drop table if exists `‚s‚S`;
drop table if exists `‚s‚T`;
drop table if exists `‚s‚U`;
drop table if exists `‚s‚V`;
drop table if exists `‚s‚W`;
drop table if exists `‚s‚X`;
drop table if exists `‚s‚P‚O`;
--enable_warnings

#
# Test LTRIM() function with Japanese characters in sjis encoding
#

SET NAMES sjis;
SET character_set_database = sjis;

CREATE TABLE `‚s‚P` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `‚s‚Q` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `‚s‚R` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `‚s‚S` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `‚s‚T` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `‚s‚U` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `‚s‚V` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `‚s‚W` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `‚s‚X` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `‚s‚P‚O` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `‚s‚P‚P` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `‚s‚P‚Q` (`‚b‚P` char(8), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = bdb;

INSERT INTO `‚s‚P` VALUES ('±²³Žµ');
INSERT INTO `‚s‚P` VALUES (' ±²³Žµ');
INSERT INTO `‚s‚P` VALUES ('  ±²³Žµ');
INSERT INTO `‚s‚P` VALUES ('   ±²³Žµ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚P` VALUES ('@±²³Žµ');
INSERT INTO `‚s‚P` VALUES ('@@±²³Žµ');
INSERT INTO `‚s‚P` VALUES ('@@@±²³Žµ');
INSERT INTO `‚s‚Q` VALUES ('‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚Q` VALUES (' ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚Q` VALUES ('  ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚Q` VALUES ('   ‚ ‚¢‚€‚Š‚š');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚Q` VALUES ('@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚Q` VALUES ('@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚Q` VALUES ('@@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚R` VALUES ('ƒ\\•\—\\');
INSERT INTO `‚s‚R` VALUES (' ƒ\\•\—\\');
INSERT INTO `‚s‚R` VALUES ('  ƒ\\•\—\\');
INSERT INTO `‚s‚R` VALUES ('   ƒ\\•\—\\');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚R` VALUES ('@ƒ\\•\—\\');
INSERT INTO `‚s‚R` VALUES ('@@ƒ\\•\—\\');
INSERT INTO `‚s‚R` VALUES ('@@@ƒ\\•\—\\');
INSERT INTO `‚s‚S` VALUES ('±²³Žµ');
INSERT INTO `‚s‚S` VALUES (' ±²³Žµ');
INSERT INTO `‚s‚S` VALUES ('  ±²³Žµ');
INSERT INTO `‚s‚S` VALUES ('   ±²³Žµ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚S` VALUES ('@±²³Žµ');
INSERT INTO `‚s‚S` VALUES ('@@±²³Žµ');
INSERT INTO `‚s‚S` VALUES ('@@@±²³Žµ');
INSERT INTO `‚s‚T` VALUES ('‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚T` VALUES (' ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚T` VALUES ('  ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚T` VALUES ('   ‚ ‚¢‚€‚Š‚š');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚T` VALUES ('@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚T` VALUES ('@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚T` VALUES ('@@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚U` VALUES ('ƒ\\•\—\\');
INSERT INTO `‚s‚U` VALUES (' ƒ\\•\—\\');
INSERT INTO `‚s‚U` VALUES ('  ƒ\\•\—\\');
INSERT INTO `‚s‚U` VALUES ('   ƒ\\•\—\\');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚U` VALUES ('@ƒ\\•\—\\');
INSERT INTO `‚s‚U` VALUES ('@@ƒ\\•\—\\');
INSERT INTO `‚s‚U` VALUES ('@@@ƒ\\•\—\\');
INSERT INTO `‚s‚V` VALUES ('±²³Žµ');
INSERT INTO `‚s‚V` VALUES (' ±²³Žµ');
INSERT INTO `‚s‚V` VALUES ('  ±²³Žµ');
INSERT INTO `‚s‚V` VALUES ('   ±²³Žµ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚V` VALUES ('@±²³Žµ');
INSERT INTO `‚s‚V` VALUES ('@@±²³Žµ');
INSERT INTO `‚s‚V` VALUES ('@@@±²³Žµ');
INSERT INTO `‚s‚W` VALUES ('‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚W` VALUES (' ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚W` VALUES ('  ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚W` VALUES ('   ‚ ‚¢‚€‚Š‚š');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚W` VALUES ('@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚W` VALUES ('@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚W` VALUES ('@@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚X` VALUES ('ƒ\\•\—\\');
INSERT INTO `‚s‚X` VALUES (' ƒ\\•\—\\');
INSERT INTO `‚s‚X` VALUES ('  ƒ\\•\—\\');
INSERT INTO `‚s‚X` VALUES ('   ƒ\\•\—\\');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚X` VALUES ('@ƒ\\•\—\\');
INSERT INTO `‚s‚X` VALUES ('@@ƒ\\•\—\\');
INSERT INTO `‚s‚X` VALUES ('@@@ƒ\\•\—\\');
INSERT INTO `‚s‚P‚O` VALUES ('±²³Žµ');
INSERT INTO `‚s‚P‚O` VALUES (' ±²³Žµ');
INSERT INTO `‚s‚P‚O` VALUES ('  ±²³Žµ');
INSERT INTO `‚s‚P‚O` VALUES ('   ±²³Žµ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚P‚O` VALUES ('@±²³Žµ');
INSERT INTO `‚s‚P‚O` VALUES ('@@±²³Žµ');
INSERT INTO `‚s‚P‚O` VALUES ('@@@±²³Žµ');
INSERT INTO `‚s‚P‚P` VALUES ('‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚P‚P` VALUES (' ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚P‚P` VALUES ('  ‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚P‚P` VALUES ('   ‚ ‚¢‚€‚Š‚š');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚P‚P` VALUES ('@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚P‚P` VALUES ('@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚P‚P` VALUES ('@@@‚ ‚¢‚€‚Š‚š');
INSERT INTO `‚s‚P‚Q` VALUES ('ƒ\\•\—\\');
INSERT INTO `‚s‚P‚Q` VALUES (' ƒ\\•\—\\');
INSERT INTO `‚s‚P‚Q` VALUES ('  ƒ\\•\—\\');
INSERT INTO `‚s‚P‚Q` VALUES ('   ƒ\\•\—\\');
# Double byte spaces are not supposed to be trimed
INSERT INTO `‚s‚P‚Q` VALUES ('@ƒ\\•\—\\');
INSERT INTO `‚s‚P‚Q` VALUES ('@@ƒ\\•\—\\');
INSERT INTO `‚s‚P‚Q` VALUES ('@@@ƒ\\•\—\\');

#InnoDB
SELECT LTRIM(`‚b‚P`) from `‚s‚P`;
SELECT LTRIM(`‚b‚P`) from `‚s‚Q`;
SELECT LTRIM(`‚b‚P`) from `‚s‚R`;

#MyISAM
SELECT LTRIM(`‚b‚P`) from `‚s‚S`;
SELECT LTRIM(`‚b‚P`) from `‚s‚T`;
SELECT LTRIM(`‚b‚P`) from `‚s‚U`;

#HEAP
SELECT LTRIM(`‚b‚P`) from `‚s‚V`;
SELECT LTRIM(`‚b‚P`) from `‚s‚W`;
SELECT LTRIM(`‚b‚P`) from `‚s‚X`;

#BDB
SELECT LTRIM(`‚b‚P`) from `‚s‚P‚O`;
SELECT LTRIM(`‚b‚P`) from `‚s‚P‚P`;
SELECT LTRIM(`‚b‚P`) from `‚s‚P‚Q`;

DROP TABLE `‚s‚P`;
DROP TABLE `‚s‚Q`;
DROP TABLE `‚s‚R`;
DROP TABLE `‚s‚S`;
DROP TABLE `‚s‚T`;
DROP TABLE `‚s‚U`;
DROP TABLE `‚s‚V`;
DROP TABLE `‚s‚W`;
DROP TABLE `‚s‚X`;
DROP TABLE `‚s‚P‚O`;
DROP TABLE `‚s‚P‚P`;
DROP TABLE `‚s‚P‚Q`;