3
drop table if exists `�s�P`;
4
drop table if exists `�s�Q`;
5
drop table if exists `�s�R`;
6
drop table if exists `�s�S`;
7
drop table if exists `�s�T`;
8
drop table if exists `�s�U`;
9
drop table if exists `�s�V`;
10
drop table if exists `�s�W`;
11
drop table if exists `�s�X`;
12
drop table if exists `�s�P�O`;
13
drop table if exists `�s�P�P`;
14
drop table if exists `�s�P�Q`;
18
# Test LIKE pattern matching using Japanese characters in sjis encoding
22
SET character_set_database = sjis;
24
CREATE TABLE `�s�P` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = innodb;
25
CREATE TABLE `�s�Q` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = innodb;
26
CREATE TABLE `�s�R` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = innodb;
27
CREATE TABLE `�s�S` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = myisam;
28
CREATE TABLE `�s�T` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = myisam;
29
CREATE TABLE `�s�U` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = myisam;
30
CREATE TABLE `�s�V` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = heap;
31
CREATE TABLE `�s�W` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = heap;
32
CREATE TABLE `�s�X` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = heap;
33
CREATE TABLE `�s�P�O` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = bdb;
34
CREATE TABLE `�s�P�P` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = bdb;
35
CREATE TABLE `�s�P�Q` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = bdb;
37
#Load the following data in each table
38
# jisx0201 hankaku-katakana data
41
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�P`;
42
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�Q`;
43
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�R`;
44
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�S`;
45
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�T`;
46
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�U`;
47
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�V`;
48
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�W`;
49
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�X`;
50
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�P�O`;
51
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�P�P`;
52
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�P�Q`;
55
SELECT * FROM `�s�P` WHERE `�b�P` LIKE ' %';
56
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '% %';
57
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '% ';
58
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '�%';
59
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '%��%';
60
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '%�';
61
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '����������������%';
62
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '%����������������%';
63
SELECT * FROM `�s�P` WHERE `�b�P` LIKE '%����������������';
64
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '�@%';
65
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '%�@%';
66
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '%�@';
67
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '��%';
68
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '%��%';
69
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '%��';
70
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '�E��������������������������������������%';
71
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '%�E��������������������������������������%';
72
SELECT * FROM `�s�Q` WHERE `�b�P` LIKE '%�E��������������������������������������';
73
SELECT * FROM `�s�R` WHERE `�b�P` LIKE '�\%';
74
SELECT * FROM `�s�R` WHERE `�b�P` LIKE '%�\%';
75
SELECT * FROM `�s�R` WHERE `�b�P` LIKE '%�\';
76
SELECT * FROM `�s�R` WHERE `�b�P` LIKE '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
77
SELECT * FROM `�s�R` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
78
SELECT * FROM `�s�R` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';
81
SELECT * FROM `�s�S` WHERE `�b�P` LIKE ' %';
82
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '% %';
83
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '% ';
84
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '�%';
85
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '%��%';
86
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '%�';
87
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '����������������%';
88
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '%����������������%';
89
SELECT * FROM `�s�S` WHERE `�b�P` LIKE '%����������������';
90
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '�@%';
91
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '%�@%';
92
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '%�@';
93
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '��%';
94
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '%��%';
95
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '%��';
96
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '�E��������������������������������������%';
97
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '%�E��������������������������������������%';
98
SELECT * FROM `�s�T` WHERE `�b�P` LIKE '%�E��������������������������������������';
99
SELECT * FROM `�s�U` WHERE `�b�P` LIKE '�\%';
100
SELECT * FROM `�s�U` WHERE `�b�P` LIKE '%�\%';
101
SELECT * FROM `�s�U` WHERE `�b�P` LIKE '%�\';
102
SELECT * FROM `�s�U` WHERE `�b�P` LIKE '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
103
SELECT * FROM `�s�U` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
104
SELECT * FROM `�s�U` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';
107
SELECT * FROM `�s�V` WHERE `�b�P` LIKE ' %';
108
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '% %';
109
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '% ';
110
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '�%';
111
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '%��%';
112
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '%�';
113
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '����������������%';
114
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '%����������������%';
115
SELECT * FROM `�s�V` WHERE `�b�P` LIKE '%����������������';
116
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '�@%';
117
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '%�@%';
118
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '%�@';
119
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '��%';
120
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '%��%';
121
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '%��';
122
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '�E��������������������������������������%';
123
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '%�E��������������������������������������%';
124
SELECT * FROM `�s�W` WHERE `�b�P` LIKE '%�E��������������������������������������';
125
SELECT * FROM `�s�X` WHERE `�b�P` LIKE '�\%';
126
SELECT * FROM `�s�X` WHERE `�b�P` LIKE '%�\%';
127
SELECT * FROM `�s�X` WHERE `�b�P` LIKE '%�\';
128
SELECT * FROM `�s�X` WHERE `�b�P` LIKE '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
129
SELECT * FROM `�s�X` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
130
SELECT * FROM `�s�X` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';
132
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE ' %';
133
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '% %';
134
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '% ';
135
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '�%';
136
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '%��%';
137
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '%�';
138
#SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '����������������%';
139
#SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '%����������������%';
140
SELECT * FROM `�s�P�O` WHERE `�b�P` LIKE '%����������������';
141
SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '�@%';
142
SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '%�@%';
143
SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '%�@';
144
SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '��%';
145
SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '%��%';
146
SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '%��';
147
#SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '�E��������������������������������������%';
148
#SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '%�E��������������������������������������%';
149
#SELECT * FROM `�s�P�P` WHERE `�b�P` LIKE '%�E��������������������������������������';
150
SELECT * FROM `�s�P�Q` WHERE `�b�P` LIKE '�\%';
151
SELECT * FROM `�s�P�Q` WHERE `�b�P` LIKE '%�\%';
152
SELECT * FROM `�s�P�Q` WHERE `�b�P` LIKE '%�\';
153
#SELECT * FROM `�s�P�Q` WHERE `�b�P` LIKE '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
154
#SELECT * FROM `�s�P�Q` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\%';
155
#SELECT * FROM `�s�P�Q` WHERE `�b�P` LIKE '%�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';