1
by brian
clean slate |
1 |
--character_set sjis
|
2 |
--disable_warnings
|
|
3 |
drop table if exists `sP`; |
|
4 |
drop table if exists `sQ`; |
|
5 |
drop table if exists `sR`; |
|
6 |
drop table if exists `sS`; |
|
7 |
drop table if exists `sT`; |
|
8 |
drop table if exists `sU`; |
|
9 |
drop table if exists `sV`; |
|
10 |
drop table if exists `sW`; |
|
11 |
drop table if exists `sX`; |
|
12 |
drop table if exists `sPO`; |
|
13 |
drop table if exists `sPP`; |
|
14 |
drop table if exists `sPQ`; |
|
15 |
--enable_warnings
|
|
16 |
||
17 |
#
|
|
18 |
# Test LIKE pattern matching using Japanese characters in sjis encoding |
|
19 |
#
|
|
20 |
||
21 |
SET NAMES sjis; |
|
22 |
SET character_set_database = sjis; |
|
23 |
||
24 |
CREATE TABLE `sP` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb; |
|
25 |
CREATE TABLE `sQ` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb; |
|
26 |
CREATE TABLE `sR` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb; |
|
27 |
CREATE TABLE `sS` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam; |
|
28 |
CREATE TABLE `sT` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam; |
|
29 |
CREATE TABLE `sU` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam; |
|
30 |
CREATE TABLE `sV` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap; |
|
31 |
CREATE TABLE `sW` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap; |
|
32 |
CREATE TABLE `sX` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap; |
|
33 |
CREATE TABLE `sPO` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb; |
|
34 |
CREATE TABLE `sPP` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb; |
|
35 |
CREATE TABLE `sPQ` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb; |
|
36 |
||
37 |
#Load the following data in each table |
|
38 |
# jisx0201 hankaku-katakana data |
|
39 |
# jisx0208 data |
|
40 |
||
41 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sP`; |
|
42 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sQ`; |
|
43 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sR`; |
|
44 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sS`; |
|
45 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sT`; |
|
46 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sU`; |
|
47 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sV`; |
|
48 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sW`; |
|
49 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sX`; |
|
50 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sPO`; |
|
51 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sPP`; |
|
52 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sPQ`; |
|
53 |
||
54 |
#InnoDB |
|
55 |
SELECT * FROM `sP` WHERE `bP` LIKE ' %'; |
|
56 |
SELECT * FROM `sP` WHERE `bP` LIKE '% %'; |
|
57 |
SELECT * FROM `sP` WHERE `bP` LIKE '% '; |
|
58 |
SELECT * FROM `sP` WHERE `bP` LIKE 'À%'; |
|
59 |
SELECT * FROM `sP` WHERE `bP` LIKE '%×Ø%'; |
|
60 |
SELECT * FROM `sP` WHERE `bP` LIKE '%¿'; |
|
61 |
SELECT * FROM `sP` WHERE `bP` LIKE '°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
62 |
SELECT * FROM `sP` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
63 |
SELECT * FROM `sP` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿'; |
|
64 |
SELECT * FROM `sQ` WHERE `bP` LIKE '@%'; |
|
65 |
SELECT * FROM `sQ` WHERE `bP` LIKE '%@%'; |
|
66 |
SELECT * FROM `sQ` WHERE `bP` LIKE '%@'; |
|
67 |
SELECT * FROM `sQ` WHERE `bP` LIKE 'Æ%'; |
|
68 |
SELECT * FROM `sQ` WHERE `bP` LIKE '% %'; |
|
69 |
SELECT * FROM `sQ` WHERE `bP` LIKE '%í'; |
|
70 |
SELECT * FROM `sQ` WHERE `bP` LIKE 'E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
71 |
SELECT * FROM `sQ` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
72 |
SELECT * FROM `sQ` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±'; |
|
73 |
SELECT * FROM `sR` WHERE `bP` LIKE '\%'; |
|
74 |
SELECT * FROM `sR` WHERE `bP` LIKE '%\%'; |
|
75 |
SELECT * FROM `sR` WHERE `bP` LIKE '%\'; |
|
76 |
SELECT * FROM `sR` WHERE `bP` LIKE '\\\\\\\\\\\\\\\\\\\\%'; |
|
77 |
SELECT * FROM `sR` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\%'; |
|
78 |
SELECT * FROM `sR` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\'; |
|
79 |
||
80 |
#MyISAM |
|
81 |
SELECT * FROM `sS` WHERE `bP` LIKE ' %'; |
|
82 |
SELECT * FROM `sS` WHERE `bP` LIKE '% %'; |
|
83 |
SELECT * FROM `sS` WHERE `bP` LIKE '% '; |
|
84 |
SELECT * FROM `sS` WHERE `bP` LIKE 'À%'; |
|
85 |
SELECT * FROM `sS` WHERE `bP` LIKE '%×Ø%'; |
|
86 |
SELECT * FROM `sS` WHERE `bP` LIKE '%¿'; |
|
87 |
SELECT * FROM `sS` WHERE `bP` LIKE '°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
88 |
SELECT * FROM `sS` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
89 |
SELECT * FROM `sS` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿'; |
|
90 |
SELECT * FROM `sT` WHERE `bP` LIKE '@%'; |
|
91 |
SELECT * FROM `sT` WHERE `bP` LIKE '%@%'; |
|
92 |
SELECT * FROM `sT` WHERE `bP` LIKE '%@'; |
|
93 |
SELECT * FROM `sT` WHERE `bP` LIKE 'Æ%'; |
|
94 |
SELECT * FROM `sT` WHERE `bP` LIKE '% %'; |
|
95 |
SELECT * FROM `sT` WHERE `bP` LIKE '%í'; |
|
96 |
SELECT * FROM `sT` WHERE `bP` LIKE 'E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
97 |
SELECT * FROM `sT` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
98 |
SELECT * FROM `sT` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±'; |
|
99 |
SELECT * FROM `sU` WHERE `bP` LIKE '\%'; |
|
100 |
SELECT * FROM `sU` WHERE `bP` LIKE '%\%'; |
|
101 |
SELECT * FROM `sU` WHERE `bP` LIKE '%\'; |
|
102 |
SELECT * FROM `sU` WHERE `bP` LIKE '\\\\\\\\\\\\\\\\\\\\%'; |
|
103 |
SELECT * FROM `sU` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\%'; |
|
104 |
SELECT * FROM `sU` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\'; |
|
105 |
||
106 |
#Heap |
|
107 |
SELECT * FROM `sV` WHERE `bP` LIKE ' %'; |
|
108 |
SELECT * FROM `sV` WHERE `bP` LIKE '% %'; |
|
109 |
SELECT * FROM `sV` WHERE `bP` LIKE '% '; |
|
110 |
SELECT * FROM `sV` WHERE `bP` LIKE 'À%'; |
|
111 |
SELECT * FROM `sV` WHERE `bP` LIKE '%×Ø%'; |
|
112 |
SELECT * FROM `sV` WHERE `bP` LIKE '%¿'; |
|
113 |
SELECT * FROM `sV` WHERE `bP` LIKE '°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
114 |
SELECT * FROM `sV` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
115 |
SELECT * FROM `sV` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿'; |
|
116 |
SELECT * FROM `sW` WHERE `bP` LIKE '@%'; |
|
117 |
SELECT * FROM `sW` WHERE `bP` LIKE '%@%'; |
|
118 |
SELECT * FROM `sW` WHERE `bP` LIKE '%@'; |
|
119 |
SELECT * FROM `sW` WHERE `bP` LIKE 'Æ%'; |
|
120 |
SELECT * FROM `sW` WHERE `bP` LIKE '% %'; |
|
121 |
SELECT * FROM `sW` WHERE `bP` LIKE '%í'; |
|
122 |
SELECT * FROM `sW` WHERE `bP` LIKE 'E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
123 |
SELECT * FROM `sW` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
124 |
SELECT * FROM `sW` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±'; |
|
125 |
SELECT * FROM `sX` WHERE `bP` LIKE '\%'; |
|
126 |
SELECT * FROM `sX` WHERE `bP` LIKE '%\%'; |
|
127 |
SELECT * FROM `sX` WHERE `bP` LIKE '%\'; |
|
128 |
SELECT * FROM `sX` WHERE `bP` LIKE '\\\\\\\\\\\\\\\\\\\\%'; |
|
129 |
SELECT * FROM `sX` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\%'; |
|
130 |
SELECT * FROM `sX` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\'; |
|
131 |
#BDB |
|
132 |
SELECT * FROM `sPO` WHERE `bP` LIKE ' %'; |
|
133 |
SELECT * FROM `sPO` WHERE `bP` LIKE '% %'; |
|
134 |
SELECT * FROM `sPO` WHERE `bP` LIKE '% '; |
|
135 |
SELECT * FROM `sPO` WHERE `bP` LIKE 'À%'; |
|
136 |
SELECT * FROM `sPO` WHERE `bP` LIKE '%×Ø%'; |
|
137 |
SELECT * FROM `sPO` WHERE `bP` LIKE '%¿'; |
|
138 |
#SELECT * FROM `sPO` WHERE `bP` LIKE '°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
139 |
#SELECT * FROM `sPO` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿%'; |
|
140 |
SELECT * FROM `sPO` WHERE `bP` LIKE '%°±²³Žµ¶·ž¹º»ŒœŸ¿'; |
|
141 |
SELECT * FROM `sPP` WHERE `bP` LIKE '@%'; |
|
142 |
SELECT * FROM `sPP` WHERE `bP` LIKE '%@%'; |
|
143 |
SELECT * FROM `sPP` WHERE `bP` LIKE '%@'; |
|
144 |
SELECT * FROM `sPP` WHERE `bP` LIKE 'Æ%'; |
|
145 |
SELECT * FROM `sPP` WHERE `bP` LIKE '% %'; |
|
146 |
SELECT * FROM `sPP` WHERE `bP` LIKE '%í'; |
|
147 |
#SELECT * FROM `sPP` WHERE `bP` LIKE 'E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
148 |
#SELECT * FROM `sPP` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±%'; |
|
149 |
#SELECT * FROM `sPP` WHERE `bP` LIKE '%E ¡¢£€¥Š§š©ª«¬®¯°±'; |
|
150 |
SELECT * FROM `sPQ` WHERE `bP` LIKE '\%'; |
|
151 |
SELECT * FROM `sPQ` WHERE `bP` LIKE '%\%'; |
|
152 |
SELECT * FROM `sPQ` WHERE `bP` LIKE '%\'; |
|
153 |
#SELECT * FROM `sPQ` WHERE `bP` LIKE '\\\\\\\\\\\\\\\\\\\\%'; |
|
154 |
#SELECT * FROM `sPQ` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\%'; |
|
155 |
#SELECT * FROM `sPQ` WHERE `bP` LIKE '%\\\\\\\\\\\\\\\\\\\\'; |
|
156 |
||
157 |
DROP TABLE `sP`; |
|
158 |
DROP TABLE `sQ`; |
|
159 |
DROP TABLE `sR`; |
|
160 |
DROP TABLE `sS`; |
|
161 |
DROP TABLE `sT`; |
|
162 |
DROP TABLE `sU`; |
|
163 |
DROP TABLE `sV`; |
|
164 |
DROP TABLE `sW`; |
|
165 |
DROP TABLE `sX`; |
|
166 |
DROP TABLE `sPO`; |
|
167 |
DROP TABLE `sPP`; |
|
168 |
DROP TABLE `sPQ`; |