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
drop table if exists `T11`;
13
drop table if exists `T12`;
17
# Test LPAD() function with Japanese character in utf8 encoding
21
SET character_set_database = utf8;
23
CREATE TABLE `T1` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
24
CREATE TABLE `T2` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
25
CREATE TABLE `T3` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
26
CREATE TABLE `T4` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
27
CREATE TABLE `T5` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
28
CREATE TABLE `T6` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
29
CREATE TABLE `T7` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
30
CREATE TABLE `T8` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
31
CREATE TABLE `T9` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
32
CREATE TABLE `T10` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
33
CREATE TABLE `T11` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
34
CREATE TABLE `T12` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
36
INSERT INTO `T1` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
37
INSERT INTO `T2` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
38
INSERT INTO `T3` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
39
INSERT INTO `T4` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
40
INSERT INTO `T5` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
41
INSERT INTO `T6` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
42
INSERT INTO `T7` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
43
INSERT INTO `T8` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
44
INSERT INTO `T9` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
45
INSERT INTO `T10` VALUES ('アイウエオ'),('アイウエ'),('アイウ'),('アイ'),('ア'),('');
46
INSERT INTO `T11` VALUES ('あいうえお'),('あいうえ'),('あいう'),('あい'),('あ'),('');
47
INSERT INTO `T12` VALUES ('龔龖龗龞龡'),('龔龖龗龞'),('龔龖龗'),('龔龖'),('龔'),('');
50
SELECT `C1`, LPAD(`C1`,5,'。') FROM `T1`;
51
SELECT `C1`, LPAD(`C1`,5,'X') FROM `T2`;
52
SELECT `C1`, LPAD(`C1`,5,'丄') FROM `T3`;
55
SELECT `C1`, LPAD(`C1`,5,'。') FROM `T4`;
56
SELECT `C1`, LPAD(`C1`,5,'X') FROM `T5`;
57
SELECT `C1`, LPAD(`C1`,5,'丄' ) FROM `T6`;
60
SELECT `C1`, LPAD(`C1`,5,'。') FROM `T7`;
61
SELECT `C1`, LPAD(`C1`,5,'X') FROM `T8`;
62
SELECT `C1`, LPAD(`C1`,5,'丄' ) FROM `T9`;
65
SELECT `C1`, LPAD(`C1`,5,'。') FROM `T10`;
66
SELECT `C1`, LPAD(`C1`,5,'X') FROM `T11`;
67
SELECT `C1`, LPAD(`C1`,5,'丄' ) FROM `T12`;