2
drop table if exists `T1`;
3
drop table if exists `T2`;
4
drop table if exists `T3`;
5
drop table if exists `T4`;
6
drop table if exists `T5`;
7
drop table if exists `T6`;
8
drop table if exists `T7`;
9
drop table if exists `T8`;
10
drop table if exists `T9`;
11
drop table if exists `T10`;
15
# Test LOCATE() function with Japanese characters in utf8 encoding
19
SET character_set_database = utf8;
21
CREATE TABLE `T1` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
22
CREATE TABLE `T2` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
23
CREATE TABLE `T3` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = innodb;
24
CREATE TABLE `T4` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
25
CREATE TABLE `T5` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
26
CREATE TABLE `T6` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = myisam;
27
CREATE TABLE `T7` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
28
CREATE TABLE `T8` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
29
CREATE TABLE `T9` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = heap;
30
CREATE TABLE `T10` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
31
CREATE TABLE `T11` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
32
CREATE TABLE `T12` (`C1` char(5), INDEX(`C1`)) DEFAULT CHARSET = utf8 engine = bdb;
34
INSERT INTO `T1` VALUES ('アイウエオ');
35
INSERT INTO `T2` VALUES ('あいうえお');
36
INSERT INTO `T3` VALUES ('龔龖龗龞龡');
37
INSERT INTO `T4` VALUES ('アイウエオ');
38
INSERT INTO `T5` VALUES ('あいうえお');
39
INSERT INTO `T6` VALUES ('龔龖龗龞龡');
40
INSERT INTO `T7` VALUES ('アイウエオ');
41
INSERT INTO `T8` VALUES ('あいうえお');
42
INSERT INTO `T9` VALUES ('龔龖龗龞龡');
43
INSERT INTO `T10` VALUES ('アイウエオ');
44
INSERT INTO `T11` VALUES ('あいうえお');
45
INSERT INTO `T12` VALUES ('龔龖龗龞龡');
48
SELECT LOCATE('ア',`C1`) from `T1`;
49
SELECT LOCATE('イ',`C1`) from `T1`;
50
SELECT LOCATE('ウ',`C1`) from `T1`;
51
SELECT LOCATE('エ',`C1`) from `T1`;
52
SELECT LOCATE('オ',`C1`) from `T1`;
53
SELECT LOCATE('ン',`C1`) from `T1`;
54
SELECT LOCATE('あ',`C1`) from `T2`;
55
SELECT LOCATE('い',`C1`) from `T2`;
56
SELECT LOCATE('う',`C1`) from `T2`;
57
SELECT LOCATE('え',`C1`) from `T2`;
58
SELECT LOCATE('お',`C1`) from `T2`;
59
SELECT LOCATE('ん',`C1`) from `T2`;
60
SELECT LOCATE('龔',`C1`) from `T3`;
61
SELECT LOCATE('龖',`C1`) from `T3`;
62
SELECT LOCATE('龗',`C1`) from `T3`;
63
SELECT LOCATE('龞',`C1`) from `T3`;
64
SELECT LOCATE('龡',`C1`) from `T3`;
65
SELECT LOCATE('丂',`C1`) from `T3`;
68
SELECT LOCATE('ア',`C1`) from `T4`;
69
SELECT LOCATE('イ',`C1`) from `T4`;
70
SELECT LOCATE('ウ',`C1`) from `T4`;
71
SELECT LOCATE('エ',`C1`) from `T4`;
72
SELECT LOCATE('オ',`C1`) from `T4`;
73
SELECT LOCATE('ン',`C1`) from `T4`;
74
SELECT LOCATE('あ',`C1`) from `T5`;
75
SELECT LOCATE('い',`C1`) from `T5`;
76
SELECT LOCATE('う',`C1`) from `T5`;
77
SELECT LOCATE('え',`C1`) from `T5`;
78
SELECT LOCATE('お',`C1`) from `T5`;
79
SELECT LOCATE('ん',`C1`) from `T5`;
80
SELECT LOCATE('龔',`C1`) from `T6`;
81
SELECT LOCATE('龖',`C1`) from `T6`;
82
SELECT LOCATE('龗',`C1`) from `T6`;
83
SELECT LOCATE('龞',`C1`) from `T6`;
84
SELECT LOCATE('龡',`C1`) from `T6`;
85
SELECT LOCATE('丂',`C1`) from `T6`;
89
SELECT LOCATE('ア',`C1`) from `T7`;
90
SELECT LOCATE('イ',`C1`) from `T7`;
91
SELECT LOCATE('ウ',`C1`) from `T7`;
92
SELECT LOCATE('エ',`C1`) from `T7`;
93
SELECT LOCATE('オ',`C1`) from `T7`;
94
SELECT LOCATE('ン',`C1`) from `T7`;
95
SELECT LOCATE('あ',`C1`) from `T8`;
96
SELECT LOCATE('い',`C1`) from `T8`;
97
SELECT LOCATE('う',`C1`) from `T8`;
98
SELECT LOCATE('え',`C1`) from `T8`;
99
SELECT LOCATE('お',`C1`) from `T8`;
100
SELECT LOCATE('ん',`C1`) from `T8`;
101
SELECT LOCATE('龔',`C1`) from `T9`;
102
SELECT LOCATE('龖',`C1`) from `T9`;
103
SELECT LOCATE('龗',`C1`) from `T9`;
104
SELECT LOCATE('龞',`C1`) from `T9`;
105
SELECT LOCATE('龡',`C1`) from `T9`;
106
SELECT LOCATE('丂',`C1`) from `T9`;
110
SELECT LOCATE('ア',`C1`) from `T10`;
111
SELECT LOCATE('イ',`C1`) from `T10`;
112
SELECT LOCATE('ウ',`C1`) from `T10`;
113
SELECT LOCATE('エ',`C1`) from `T10`;
114
SELECT LOCATE('オ',`C1`) from `T10`;
115
SELECT LOCATE('ン',`C1`) from `T10`;
116
SELECT LOCATE('あ',`C1`) from `T11`;
117
SELECT LOCATE('い',`C1`) from `T11`;
118
SELECT LOCATE('う',`C1`) from `T11`;
119
SELECT LOCATE('え',`C1`) from `T11`;
120
SELECT LOCATE('お',`C1`) from `T11`;
121
SELECT LOCATE('ん',`C1`) from `T11`;
122
SELECT LOCATE('龔',`C1`) from `T12`;
123
SELECT LOCATE('龖',`C1`) from `T12`;
124
SELECT LOCATE('龗',`C1`) from `T12`;
125
SELECT LOCATE('龞',`C1`) from `T12`;
126
SELECT LOCATE('龡',`C1`) from `T12`;
127
SELECT LOCATE('丂',`C1`) from `T12`;