1
--source include/have_ucs2.inc
4
drop table if exists `�ԣ�`;
5
drop table if exists `�ԣ�`;
6
drop table if exists `�ԣ�`;
7
drop table if exists `�ԣ�`;
8
drop table if exists `�ԣ�`;
9
drop table if exists `�ԣ�`;
10
drop table if exists `�ԣ�`;
11
drop table if exists `�ԣ�`;
12
drop table if exists `�ԣ�`;
13
drop table if exists `�ԣ���`;
14
drop table if exists `�ԣ���`;
15
drop table if exists `�ԣ���`;
19
# Test RIGHT() function with Japanese character in ucs2 encoding
23
SET character_set_database = ucs2;
24
SET collation_connection = ucs2_general_ci;
26
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = innodb;
27
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = innodb;
28
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = innodb;
29
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = myisam;
30
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = myisam;
31
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = myisam;
32
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = heap;
33
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = heap;
34
CREATE TABLE `�ԣ�` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = heap;
35
CREATE TABLE `�ԣ���` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = bdb;
36
CREATE TABLE `�ԣ���` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = bdb;
37
CREATE TABLE `�ԣ���` (`�ã�` char(5), INDEX(`�ã�`)) DEFAULT CHARSET = ucs2 engine = bdb;
39
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
40
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
41
INSERT INTO `�ԣ�` VALUES ('���ݏ�ޏ�ߏ��'),('���ݏ�ޏ��'),('���ݏ��'),('����'),('���'),('');
42
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
43
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
44
INSERT INTO `�ԣ�` VALUES ('���ݏ�ޏ�ߏ��'),('���ݏ�ޏ��'),('���ݏ��'),('����'),('���'),('');
45
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
46
INSERT INTO `�ԣ�` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
47
INSERT INTO `�ԣ�` VALUES ('���ݏ�ޏ�ߏ��'),('���ݏ�ޏ��'),('���ݏ��'),('����'),('���'),('');
48
INSERT INTO `�ԣ���` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
49
INSERT INTO `�ԣ���` VALUES ('����������'),('��������'),('������'),('����'),('��'),('');
50
INSERT INTO `�ԣ���` VALUES ('���ݏ�ޏ�ߏ��'),('���ݏ�ޏ��'),('���ݏ��'),('����'),('���'),('');
53
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
54
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
55
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
56
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
57
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
58
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
59
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
60
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
61
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
62
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
63
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
64
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
65
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
66
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
67
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
68
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
69
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
70
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
73
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
74
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
75
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
76
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
77
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
78
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
79
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
80
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
81
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
82
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
83
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
84
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
85
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
86
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
87
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
88
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
89
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
90
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
93
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
94
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
95
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
96
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
97
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
98
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
99
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
100
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
101
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
102
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
103
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
104
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
105
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ�`;
106
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ�`;
107
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ�`;
108
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ�`;
109
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ�`;
110
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ�`;
113
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ���`;
114
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ���`;
115
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ���`;
116
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ���`;
117
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ���`;
118
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ���`;
119
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ���`;
120
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ���`;
121
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ���`;
122
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ���`;
123
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ���`;
124
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ���`;
125
SELECT `�ã�`, RIGHT(`�ã�`,0) FROM `�ԣ���`;
126
SELECT `�ã�`, RIGHT(`�ã�`,1) FROM `�ԣ���`;
127
SELECT `�ã�`, RIGHT(`�ã�`,2) FROM `�ԣ���`;
128
SELECT `�ã�`, RIGHT(`�ã�`,3) FROM `�ԣ���`;
129
SELECT `�ã�`, RIGHT(`�ã�`,4) FROM `�ԣ���`;
130
SELECT `�ã�`, RIGHT(`�ã�`,5) FROM `�ԣ���`;