1 drop table if exists `T1`;
2 drop table if exists `T2`;
3 drop table if exists `T3`;
4 drop table if exists `T4`;
5 drop table if exists `T5`;
6 drop table if exists `T6`;
7 drop table if exists `T7`;
8 drop table if exists `T8`;
9 drop table if exists `T9`;
11 SET character_set_database = utf8;
12 CREATE TABLE `T1` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
13 CREATE TABLE `T2` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
14 CREATE TABLE `T3` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
15 CREATE TABLE `T4` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
16 CREATE TABLE `T5` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
17 CREATE TABLE `T6` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
18 CREATE TABLE `T7` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = MEMORY;
19 CREATE TABLE `T8` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = MEMORY;
20 CREATE TABLE `T9` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = MEMORY;
21 INSERT INTO `T1` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
22 INSERT INTO `T2` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
23 INSERT INTO `T3` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
24 INSERT INTO `T4` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
25 INSERT INTO `T5` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
26 INSERT INTO `T6` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
27 INSERT INTO `T7` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
28 INSERT INTO `T8` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
29 INSERT INTO `T9` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
30 SELECT `C1`, RIGHT(`C1`,0) FROM `T1`;
38 SELECT `C1`, RIGHT(`C1`,1) FROM `T1`;
46 SELECT `C1`, RIGHT(`C1`,2) FROM `T1`;
54 SELECT `C1`, RIGHT(`C1`,3) FROM `T1`;
62 SELECT `C1`, RIGHT(`C1`,4) FROM `T1`;
70 SELECT `C1`, RIGHT(`C1`,5) FROM `T1`;
78 SELECT `C1`, RIGHT(`C1`,0) FROM `T2`;
86 SELECT `C1`, RIGHT(`C1`,1) FROM `T2`;
94 SELECT `C1`, RIGHT(`C1`,2) FROM `T2`;
102 SELECT `C1`, RIGHT(`C1`,3) FROM `T2`;
110 SELECT `C1`, RIGHT(`C1`,4) FROM `T2`;
118 SELECT `C1`, RIGHT(`C1`,5) FROM `T2`;
126 SELECT `C1`, RIGHT(`C1`,0) FROM `T3`;
134 SELECT `C1`, RIGHT(`C1`,1) FROM `T3`;
142 SELECT `C1`, RIGHT(`C1`,2) FROM `T3`;
150 SELECT `C1`, RIGHT(`C1`,3) FROM `T3`;
158 SELECT `C1`, RIGHT(`C1`,4) FROM `T3`;
166 SELECT `C1`, RIGHT(`C1`,5) FROM `T3`;
174 SELECT `C1`, RIGHT(`C1`,0) FROM `T4`;
182 SELECT `C1`, RIGHT(`C1`,1) FROM `T4`;
190 SELECT `C1`, RIGHT(`C1`,2) FROM `T4`;
198 SELECT `C1`, RIGHT(`C1`,3) FROM `T4`;
206 SELECT `C1`, RIGHT(`C1`,4) FROM `T4`;
214 SELECT `C1`, RIGHT(`C1`,5) FROM `T4`;
222 SELECT `C1`, RIGHT(`C1`,0) FROM `T5`;
230 SELECT `C1`, RIGHT(`C1`,1) FROM `T5`;
238 SELECT `C1`, RIGHT(`C1`,2) FROM `T5`;
246 SELECT `C1`, RIGHT(`C1`,3) FROM `T5`;
254 SELECT `C1`, RIGHT(`C1`,4) FROM `T5`;
262 SELECT `C1`, RIGHT(`C1`,5) FROM `T5`;
270 SELECT `C1`, RIGHT(`C1`,0) FROM `T6`;
278 SELECT `C1`, RIGHT(`C1`,1) FROM `T6`;
286 SELECT `C1`, RIGHT(`C1`,2) FROM `T6`;
294 SELECT `C1`, RIGHT(`C1`,3) FROM `T6`;
302 SELECT `C1`, RIGHT(`C1`,4) FROM `T6`;
310 SELECT `C1`, RIGHT(`C1`,5) FROM `T6`;
318 SELECT `C1`, RIGHT(`C1`,0) FROM `T7`;
326 SELECT `C1`, RIGHT(`C1`,1) FROM `T7`;
334 SELECT `C1`, RIGHT(`C1`,2) FROM `T7`;
342 SELECT `C1`, RIGHT(`C1`,3) FROM `T7`;
350 SELECT `C1`, RIGHT(`C1`,4) FROM `T7`;
358 SELECT `C1`, RIGHT(`C1`,5) FROM `T7`;
366 SELECT `C1`, RIGHT(`C1`,0) FROM `T8`;
374 SELECT `C1`, RIGHT(`C1`,1) FROM `T8`;
382 SELECT `C1`, RIGHT(`C1`,2) FROM `T8`;
390 SELECT `C1`, RIGHT(`C1`,3) FROM `T8`;
398 SELECT `C1`, RIGHT(`C1`,4) FROM `T8`;
406 SELECT `C1`, RIGHT(`C1`,5) FROM `T8`;
414 SELECT `C1`, RIGHT(`C1`,0) FROM `T9`;
422 SELECT `C1`, RIGHT(`C1`,1) FROM `T9`;
430 SELECT `C1`, RIGHT(`C1`,2) FROM `T9`;
438 SELECT `C1`, RIGHT(`C1`,3) FROM `T9`;
446 SELECT `C1`, RIGHT(`C1`,4) FROM `T9`;
454 SELECT `C1`, RIGHT(`C1`,5) FROM `T9`;