summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/jp/t/jp_rpad_ucs2.test
blob: 9f39c20e7a9d6ffc4a75b54370f936b100a978b8 (plain)
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
--source include/have_ucs2.inc
--source include/have_innodb.inc

--disable_warnings
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
drop table if exists `�ԣ�`;
--enable_warnings

#
# Test RPAD() function with Japanese character in ucs2 encoding
#

SET NAMES ujis;
SET character_set_database = ucs2;
SET collation_connection = ucs2_general_ci;

CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = MEMORY;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = MEMORY;
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = MEMORY;

INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
INSERT INTO `�ԣ�` VALUES ('��܏�ݏ�ޏ�ߏ��'),('��܏�ݏ�ޏ��'),('��܏�ݏ��'),('��܏��'),('���'),('');
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
INSERT INTO `�ԣ�` VALUES ('��܏�ݏ�ޏ�ߏ��'),('��܏�ݏ�ޏ��'),('��܏�ݏ��'),('��܏��'),('���'),('');
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
INSERT INTO `�ԣ�` VALUES ('��܏�ݏ�ޏ�ߏ��'),('��܏�ݏ�ޏ��'),('��܏�ݏ��'),('��܏��'),('���'),('');

#InnoDB
SELECT `�ã�`, RPAD(`�ã�`,5,'��') FROM `�ԣ�`;
SELECT `�ã�`, RPAD(`�ã�`,5,'��') FROM `�ԣ�`;
SELECT `�ã�`, RPAD(`�ã�`,5,'���') FROM `�ԣ�`;

#MyISAM
SELECT `�ã�`, RPAD(`�ã�`,5,'��') FROM `�ԣ�`;
SELECT `�ã�`, RPAD(`�ã�`,5,'��') FROM `�ԣ�`;
SELECT `�ã�`, RPAD(`�ã�`,5,'���' ) FROM `�ԣ�`;

#MEMORY
SELECT `�ã�`, RPAD(`�ã�`,5,'��') FROM `�ԣ�`;
SELECT `�ã�`, RPAD(`�ã�`,5,'��') FROM `�ԣ�`;
SELECT `�ã�`, RPAD(`�ã�`,5,'���' ) FROM `�ԣ�`;

DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;
DROP TABLE `�ԣ�`;