~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
--disable_warnings
2
drop table if exists `T1`;
3
drop table if exists `T2`;
4
drop table if exists `T3`;
5
drop table if exists `T4`;
6
drop table if exists `T5`;
7
drop table if exists `T6`;
8
drop table if exists `T7`;
9
drop table if exists `T8`;
10
drop table if exists `T9`;
11
drop table if exists `T10`;
12
--enable_warnings
13
14
#
15
# Test RTRIM() function with Japanese characters in utf8 encoding
16
#
17
18
SET NAMES utf8;
19
SET character_set_database = utf8;
20
21
CREATE TABLE `T1` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
22
CREATE TABLE `T2` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
23
CREATE TABLE `T3` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
24
CREATE TABLE `T4` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
25
CREATE TABLE `T5` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
26
CREATE TABLE `T6` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
27
CREATE TABLE `T7` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
28
CREATE TABLE `T8` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
29
CREATE TABLE `T9` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
30
CREATE TABLE `T10` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
31
CREATE TABLE `T11` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
32
CREATE TABLE `T12` (`C1` char(8), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
33
34
INSERT INTO `T1` VALUES ('アイウエオ');
35
INSERT INTO `T1` VALUES ('アイウエオ ');
36
INSERT INTO `T1` VALUES ('アイウエオ  ');
37
INSERT INTO `T1` VALUES ('アイウエオ   ');
38
# Double byte spaces are not supposed to be trimed
39
INSERT INTO `T1` VALUES ('アイウエオ ');
40
INSERT INTO `T1` VALUES ('アイウエオ  ');
41
INSERT INTO `T1` VALUES ('アイウエオ   ');
42
INSERT INTO `T2` VALUES ('あいうえお');
43
INSERT INTO `T2` VALUES ('あいうえお ');
44
INSERT INTO `T2` VALUES ('あいうえお  ');
45
INSERT INTO `T2` VALUES ('あいうえお   ');
46
# Double byte spaces are not supposed to be trimed
47
INSERT INTO `T2` VALUES ('あいうえお ');
48
INSERT INTO `T2` VALUES ('あいうえお  ');
49
INSERT INTO `T2` VALUES ('あいうえお   ');
50
INSERT INTO `T3` VALUES ('龔龖龗龞龡');
51
INSERT INTO `T3` VALUES ('龔龖龗龞龡 ');
52
INSERT INTO `T3` VALUES ('龔龖龗龞龡  ');
53
INSERT INTO `T3` VALUES ('龔龖龗龞龡   ');
54
# Double byte spaces are not supposed to be trimed
55
INSERT INTO `T3` VALUES ('龔龖龗龞龡 ');
56
INSERT INTO `T3` VALUES ('龔龖龗龞龡  ');
57
INSERT INTO `T3` VALUES ('龔龖龗龞龡   ');
58
INSERT INTO `T4` VALUES ('アイウエオ');
59
INSERT INTO `T4` VALUES ('アイウエオ ');
60
INSERT INTO `T4` VALUES ('アイウエオ  ');
61
INSERT INTO `T4` VALUES ('アイウエオ   ');
62
# Double byte spaces are not supposed to be trimed
63
INSERT INTO `T4` VALUES ('アイウエオ ');
64
INSERT INTO `T4` VALUES ('アイウエオ  ');
65
INSERT INTO `T4` VALUES ('アイウエオ   ');
66
INSERT INTO `T5` VALUES ('あいうえお');
67
INSERT INTO `T5` VALUES ('あいうえお ');
68
INSERT INTO `T5` VALUES ('あいうえお  ');
69
INSERT INTO `T5` VALUES ('あいうえお   ');
70
# Double byte spaces are not supposed to be trimed
71
INSERT INTO `T5` VALUES ('あいうえお ');
72
INSERT INTO `T5` VALUES ('あいうえお  ');
73
INSERT INTO `T5` VALUES ('あいうえお   ');
74
INSERT INTO `T6` VALUES ('龔龖龗龞龡');
75
INSERT INTO `T6` VALUES ('龔龖龗龞龡 ');
76
INSERT INTO `T6` VALUES ('龔龖龗龞龡  ');
77
INSERT INTO `T6` VALUES ('龔龖龗龞龡   ');
78
# Double byte spaces are not supposed to be trimed
79
INSERT INTO `T6` VALUES ('龔龖龗龞龡 ');
80
INSERT INTO `T6` VALUES ('龔龖龗龞龡  ');
81
INSERT INTO `T6` VALUES ('龔龖龗龞龡   ');
82
INSERT INTO `T7` VALUES ('アイウエオ');
83
INSERT INTO `T7` VALUES ('アイウエオ ');
84
INSERT INTO `T7` VALUES ('アイウエオ  ');
85
INSERT INTO `T7` VALUES ('アイウエオ   ');
86
# Double byte spaces are not supposed to be trimed
87
INSERT INTO `T7` VALUES ('アイウエオ ');
88
INSERT INTO `T7` VALUES ('アイウエオ  ');
89
INSERT INTO `T7` VALUES ('アイウエオ   ');
90
INSERT INTO `T8` VALUES ('あいうえお');
91
INSERT INTO `T8` VALUES ('あいうえお ');
92
INSERT INTO `T8` VALUES ('あいうえお  ');
93
INSERT INTO `T8` VALUES ('あいうえお   ');
94
# Double byte spaces are not supposed to be trimed
95
INSERT INTO `T8` VALUES ('あいうえお ');
96
INSERT INTO `T8` VALUES ('あいうえお  ');
97
INSERT INTO `T8` VALUES ('あいうえお   ');
98
INSERT INTO `T9` VALUES ('龔龖龗龞龡');
99
INSERT INTO `T9` VALUES ('龔龖龗龞龡 ');
100
INSERT INTO `T9` VALUES ('龔龖龗龞龡  ');
101
INSERT INTO `T9` VALUES ('龔龖龗龞龡   ');
102
# Double byte spaces are not supposed to be trimed
103
INSERT INTO `T9` VALUES ('龔龖龗龞龡 ');
104
INSERT INTO `T9` VALUES ('龔龖龗龞龡  ');
105
INSERT INTO `T9` VALUES ('龔龖龗龞龡   ');
106
INSERT INTO `T10` VALUES ('アイウエオ');
107
INSERT INTO `T10` VALUES ('アイウエオ ');
108
INSERT INTO `T10` VALUES ('アイウエオ  ');
109
INSERT INTO `T10` VALUES ('アイウエオ   ');
110
# Double byte spaces are not supposed to be trimed
111
INSERT INTO `T10` VALUES ('アイウエオ ');
112
INSERT INTO `T10` VALUES ('アイウエオ  ');
113
INSERT INTO `T10` VALUES ('アイウエオ   ');
114
INSERT INTO `T11` VALUES ('あいうえお');
115
INSERT INTO `T11` VALUES ('あいうえお ');
116
INSERT INTO `T11` VALUES ('あいうえお  ');
117
INSERT INTO `T11` VALUES ('あいうえお   ');
118
# Double byte spaces are not supposed to be trimed
119
INSERT INTO `T11` VALUES ('あいうえお ');
120
INSERT INTO `T11` VALUES ('あいうえお  ');
121
INSERT INTO `T11` VALUES ('あいうえお   ');
122
INSERT INTO `T12` VALUES ('龔龖龗龞龡');
123
INSERT INTO `T12` VALUES ('龔龖龗龞龡 ');
124
INSERT INTO `T12` VALUES ('龔龖龗龞龡  ');
125
INSERT INTO `T12` VALUES ('龔龖龗龞龡   ');
126
# Double byte spaces are not supposed to be trimed
127
INSERT INTO `T12` VALUES ('龔龖龗龞龡 ');
128
INSERT INTO `T12` VALUES ('龔龖龗龞龡  ');
129
INSERT INTO `T12` VALUES ('龔龖龗龞龡   ');
130
131
#InnoDB
132
SELECT RTRIM(`C1`) from `T1`;
133
SELECT RTRIM(`C1`) from `T2`;
134
SELECT RTRIM(`C1`) from `T3`;
135
136
#MyISAM
137
SELECT RTRIM(`C1`) from `T4`;
138
SELECT RTRIM(`C1`) from `T5`;
139
SELECT RTRIM(`C1`) from `T6`;
140
141
#HEAP
142
SELECT RTRIM(`C1`) from `T7`;
143
SELECT RTRIM(`C1`) from `T8`;
144
SELECT RTRIM(`C1`) from `T9`;
145
146
#BDB
147
SELECT RTRIM(`C1`) from `T10`;
148
SELECT RTRIM(`C1`) from `T11`;
149
SELECT RTRIM(`C1`) from `T12`;
150
151
DROP TABLE `T1`;
152
DROP TABLE `T2`;
153
DROP TABLE `T3`;
154
DROP TABLE `T4`;
155
DROP TABLE `T5`;
156
DROP TABLE `T6`;
157
DROP TABLE `T7`;
158
DROP TABLE `T8`;
159
DROP TABLE `T9`;
160
DROP TABLE `T10`;
161
DROP TABLE `T11`;
162
DROP TABLE `T12`;