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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
--character_set sjis
--disable_warnings
drop table if exists `sP`;
drop table if exists `sQ`;
drop table if exists `sR`;
drop table if exists `sS`;
drop table if exists `sT`;
drop table if exists `sU`;
drop table if exists `sV`;
drop table if exists `sW`;
drop table if exists `sX`;
drop table if exists `sPO`;
--enable_warnings
#
# Test INSTR() function with Japanese characters in sjis encoding
#
SET NAMES sjis;
SET character_set_database = sjis;
CREATE TABLE `sP` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `sQ` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `sR` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `sS` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `sT` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `sU` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `sV` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = MEMORY;
CREATE TABLE `sW` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = MEMORY;
CREATE TABLE `sX` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = MEMORY;
CREATE TABLE `sPO` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `sPP` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `sPQ` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb;
INSERT INTO `sP` VALUES ('±²³Žµ');
INSERT INTO `sQ` VALUES (' ¢€Šš');
INSERT INTO `sR` VALUES ('\\\\\');
INSERT INTO `sS` VALUES ('±²³Žµ');
INSERT INTO `sT` VALUES (' ¢€Šš');
INSERT INTO `sU` VALUES ('\\\\\');
INSERT INTO `sV` VALUES ('±²³Žµ');
INSERT INTO `sW` VALUES (' ¢€Šš');
INSERT INTO `sX` VALUES ('\\\\\');
INSERT INTO `sPO` VALUES ('±²³Žµ');
INSERT INTO `sPP` VALUES (' ¢€Šš');
INSERT INTO `sPQ` VALUES ('\\\\\');
#InnoDB
SELECT INSTR(`bP`,'±') from `sP`;
SELECT INSTR(`bP`,'²') from `sP`;
SELECT INSTR(`bP`,'³') from `sP`;
SELECT INSTR(`bP`,'Ž') from `sP`;
SELECT INSTR(`bP`,'µ') from `sP`;
SELECT INSTR(`bP`,'Ý') from `sP`;
SELECT INSTR(`bP`,' ') from `sQ`;
SELECT INSTR(`bP`,'¢') from `sQ`;
SELECT INSTR(`bP`,'€') from `sQ`;
SELECT INSTR(`bP`,'Š') from `sQ`;
SELECT INSTR(`bP`,'š') from `sQ`;
SELECT INSTR(`bP`,'ñ') from `sQ`;
SELECT INSTR(`bP`,'\') from `sR`;
SELECT INSTR(`bP`,'\') from `sR`;
SELECT INSTR(`bP`,'\') from `sR`;
SELECT INSTR(`bP`,'\') from `sR`;
SELECT INSTR(`bP`,'\') from `sR`;
SELECT INSTR(`bP`,'\') from `sR`;
#MyISAM
SELECT INSTR(`bP`,'±') from `sS`;
SELECT INSTR(`bP`,'²') from `sS`;
SELECT INSTR(`bP`,'³') from `sS`;
SELECT INSTR(`bP`,'Ž') from `sS`;
SELECT INSTR(`bP`,'µ') from `sS`;
SELECT INSTR(`bP`,'Ý') from `sS`;
SELECT INSTR(`bP`,' ') from `sT`;
SELECT INSTR(`bP`,'¢') from `sT`;
SELECT INSTR(`bP`,'€') from `sT`;
SELECT INSTR(`bP`,'Š') from `sT`;
SELECT INSTR(`bP`,'š') from `sT`;
SELECT INSTR(`bP`,'ñ') from `sT`;
SELECT INSTR(`bP`,'\') from `sU`;
SELECT INSTR(`bP`,'\') from `sU`;
SELECT INSTR(`bP`,'\') from `sU`;
SELECT INSTR(`bP`,'\') from `sU`;
SELECT INSTR(`bP`,'\') from `sU`;
SELECT INSTR(`bP`,'\') from `sU`;
#MEMORY
SELECT INSTR(`bP`,'±') from `sV`;
SELECT INSTR(`bP`,'²') from `sV`;
SELECT INSTR(`bP`,'³') from `sV`;
SELECT INSTR(`bP`,'Ž') from `sV`;
SELECT INSTR(`bP`,'µ') from `sV`;
SELECT INSTR(`bP`,'Ý') from `sV`;
SELECT INSTR(`bP`,' ') from `sW`;
SELECT INSTR(`bP`,'¢') from `sW`;
SELECT INSTR(`bP`,'€') from `sW`;
SELECT INSTR(`bP`,'Š') from `sW`;
SELECT INSTR(`bP`,'š') from `sW`;
SELECT INSTR(`bP`,'ñ') from `sW`;
SELECT INSTR(`bP`,'\') from `sX`;
SELECT INSTR(`bP`,'\') from `sX`;
SELECT INSTR(`bP`,'\') from `sX`;
SELECT INSTR(`bP`,'\') from `sX`;
SELECT INSTR(`bP`,'\') from `sX`;
SELECT INSTR(`bP`,'\') from `sX`;
#BDB
SELECT INSTR(`bP`,'±') from `sPO`;
SELECT INSTR(`bP`,'²') from `sPO`;
SELECT INSTR(`bP`,'³') from `sPO`;
SELECT INSTR(`bP`,'Ž') from `sPO`;
SELECT INSTR(`bP`,'µ') from `sPO`;
SELECT INSTR(`bP`,'Ý') from `sPO`;
SELECT INSTR(`bP`,' ') from `sPP`;
SELECT INSTR(`bP`,'¢') from `sPP`;
SELECT INSTR(`bP`,'€') from `sPP`;
SELECT INSTR(`bP`,'Š') from `sPP`;
SELECT INSTR(`bP`,'š') from `sPP`;
SELECT INSTR(`bP`,'ñ') from `sPP`;
SELECT INSTR(`bP`,'\') from `sPQ`;
SELECT INSTR(`bP`,'\') from `sPQ`;
SELECT INSTR(`bP`,'\') from `sPQ`;
SELECT INSTR(`bP`,'\') from `sPQ`;
SELECT INSTR(`bP`,'\') from `sPQ`;
SELECT INSTR(`bP`,'\') from `sPQ`;
DROP TABLE `sP`;
DROP TABLE `sQ`;
DROP TABLE `sR`;
DROP TABLE `sS`;
DROP TABLE `sT`;
DROP TABLE `sU`;
DROP TABLE `sV`;
DROP TABLE `sW`;
DROP TABLE `sX`;
DROP TABLE `sPO`;
DROP TABLE `sPP`;
DROP TABLE `sPQ`;
|