-- source include/have_innodb.inc
-- source include/have_bdb.inc
--disable_warnings
drop table if exists `Ｔ１`;
drop table if exists `Ｔ２`;
drop table if exists `Ｔ３`;
drop table if exists `Ｔ４`;
drop table if exists `Ｔ５`;
drop table if exists `Ｔ６`;
drop table if exists `Ｔ７`;
drop table if exists `Ｔ８`;
drop table if exists `Ｔ９`;
drop table if exists `Ｔ１０`;
--enable_warnings

#
# Test LOCATE() function with Japanese characters in utf8 encoding
#

SET NAMES utf8;
SET character_set_database = utf8;

CREATE TABLE `Ｔ１` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `Ｔ２` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `Ｔ３` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `Ｔ４` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `Ｔ５` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `Ｔ６` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `Ｔ７` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `Ｔ８` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `Ｔ９` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `Ｔ１０` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `Ｔ１１` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `Ｔ１２` (`Ｃ１` char(5), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = bdb;

INSERT INTO `Ｔ１` VALUES ('ｱｲｳｴｵ');
INSERT INTO `Ｔ２` VALUES ('あいうえお');
INSERT INTO `Ｔ３` VALUES ('龔龖龗龞龡');
INSERT INTO `Ｔ４` VALUES ('ｱｲｳｴｵ');
INSERT INTO `Ｔ５` VALUES ('あいうえお');
INSERT INTO `Ｔ６` VALUES ('龔龖龗龞龡');
INSERT INTO `Ｔ７` VALUES ('ｱｲｳｴｵ');
INSERT INTO `Ｔ８` VALUES ('あいうえお');
INSERT INTO `Ｔ９` VALUES ('龔龖龗龞龡');
INSERT INTO `Ｔ１０` VALUES ('ｱｲｳｴｵ');
INSERT INTO `Ｔ１１` VALUES ('あいうえお');
INSERT INTO `Ｔ１２` VALUES ('龔龖龗龞龡');

#InnoDB
SELECT LOCATE('ｱ',`Ｃ１`) from `Ｔ１`;
SELECT LOCATE('ｲ',`Ｃ１`) from `Ｔ１`;
SELECT LOCATE('ｳ',`Ｃ１`) from `Ｔ１`;
SELECT LOCATE('ｴ',`Ｃ１`) from `Ｔ１`;
SELECT LOCATE('ｵ',`Ｃ１`) from `Ｔ１`;
SELECT LOCATE('ﾝ',`Ｃ１`) from `Ｔ１`;
SELECT LOCATE('あ',`Ｃ１`) from `Ｔ２`;
SELECT LOCATE('い',`Ｃ１`) from `Ｔ２`;
SELECT LOCATE('う',`Ｃ１`) from `Ｔ２`;
SELECT LOCATE('え',`Ｃ１`) from `Ｔ２`;
SELECT LOCATE('お',`Ｃ１`) from `Ｔ２`;
SELECT LOCATE('ん',`Ｃ１`) from `Ｔ２`;
SELECT LOCATE('龔',`Ｃ１`) from `Ｔ３`;
SELECT LOCATE('龖',`Ｃ１`) from `Ｔ３`;
SELECT LOCATE('龗',`Ｃ１`) from `Ｔ３`;
SELECT LOCATE('龞',`Ｃ１`) from `Ｔ３`;
SELECT LOCATE('龡',`Ｃ１`) from `Ｔ３`;
SELECT LOCATE('丂',`Ｃ１`) from `Ｔ３`;

#MyISAM
SELECT LOCATE('ｱ',`Ｃ１`) from `Ｔ４`;
SELECT LOCATE('ｲ',`Ｃ１`) from `Ｔ４`;
SELECT LOCATE('ｳ',`Ｃ１`) from `Ｔ４`;
SELECT LOCATE('ｴ',`Ｃ１`) from `Ｔ４`;
SELECT LOCATE('ｵ',`Ｃ１`) from `Ｔ４`;
SELECT LOCATE('ﾝ',`Ｃ１`) from `Ｔ４`;
SELECT LOCATE('あ',`Ｃ１`) from `Ｔ５`;
SELECT LOCATE('い',`Ｃ１`) from `Ｔ５`;
SELECT LOCATE('う',`Ｃ１`) from `Ｔ５`;
SELECT LOCATE('え',`Ｃ１`) from `Ｔ５`;
SELECT LOCATE('お',`Ｃ１`) from `Ｔ５`;
SELECT LOCATE('ん',`Ｃ１`) from `Ｔ５`;
SELECT LOCATE('龔',`Ｃ１`) from `Ｔ６`;
SELECT LOCATE('龖',`Ｃ１`) from `Ｔ６`;
SELECT LOCATE('龗',`Ｃ１`) from `Ｔ６`;
SELECT LOCATE('龞',`Ｃ１`) from `Ｔ６`;
SELECT LOCATE('龡',`Ｃ１`) from `Ｔ６`;
SELECT LOCATE('丂',`Ｃ１`) from `Ｔ６`;


#HEAP
SELECT LOCATE('ｱ',`Ｃ１`) from `Ｔ７`;
SELECT LOCATE('ｲ',`Ｃ１`) from `Ｔ７`;
SELECT LOCATE('ｳ',`Ｃ１`) from `Ｔ７`;
SELECT LOCATE('ｴ',`Ｃ１`) from `Ｔ７`;
SELECT LOCATE('ｵ',`Ｃ１`) from `Ｔ７`;
SELECT LOCATE('ﾝ',`Ｃ１`) from `Ｔ７`;
SELECT LOCATE('あ',`Ｃ１`) from `Ｔ８`;
SELECT LOCATE('い',`Ｃ１`) from `Ｔ８`;
SELECT LOCATE('う',`Ｃ１`) from `Ｔ８`;
SELECT LOCATE('え',`Ｃ１`) from `Ｔ８`;
SELECT LOCATE('お',`Ｃ１`) from `Ｔ８`;
SELECT LOCATE('ん',`Ｃ１`) from `Ｔ８`;
SELECT LOCATE('龔',`Ｃ１`) from `Ｔ９`;
SELECT LOCATE('龖',`Ｃ１`) from `Ｔ９`;
SELECT LOCATE('龗',`Ｃ１`) from `Ｔ９`;
SELECT LOCATE('龞',`Ｃ１`) from `Ｔ９`;
SELECT LOCATE('龡',`Ｃ１`) from `Ｔ９`;
SELECT LOCATE('丂',`Ｃ１`) from `Ｔ９`;


#BDB
SELECT LOCATE('ｱ',`Ｃ１`) from `Ｔ１０`;
SELECT LOCATE('ｲ',`Ｃ１`) from `Ｔ１０`;
SELECT LOCATE('ｳ',`Ｃ１`) from `Ｔ１０`;
SELECT LOCATE('ｴ',`Ｃ１`) from `Ｔ１０`;
SELECT LOCATE('ｵ',`Ｃ１`) from `Ｔ１０`;
SELECT LOCATE('ﾝ',`Ｃ１`) from `Ｔ１０`;
SELECT LOCATE('あ',`Ｃ１`) from `Ｔ１１`;
SELECT LOCATE('い',`Ｃ１`) from `Ｔ１１`;
SELECT LOCATE('う',`Ｃ１`) from `Ｔ１１`;
SELECT LOCATE('え',`Ｃ１`) from `Ｔ１１`;
SELECT LOCATE('お',`Ｃ１`) from `Ｔ１１`;
SELECT LOCATE('ん',`Ｃ１`) from `Ｔ１１`;
SELECT LOCATE('龔',`Ｃ１`) from `Ｔ１２`;
SELECT LOCATE('龖',`Ｃ１`) from `Ｔ１２`;
SELECT LOCATE('龗',`Ｃ１`) from `Ｔ１２`;
SELECT LOCATE('龞',`Ｃ１`) from `Ｔ１２`;
SELECT LOCATE('龡',`Ｃ１`) from `Ｔ１２`;
SELECT LOCATE('丂',`Ｃ１`) from `Ｔ１２`;


DROP TABLE `Ｔ１`;
DROP TABLE `Ｔ２`;
DROP TABLE `Ｔ３`;
DROP TABLE `Ｔ４`;
DROP TABLE `Ｔ５`;
DROP TABLE `Ｔ６`;
DROP TABLE `Ｔ７`;
DROP TABLE `Ｔ８`;
DROP TABLE `Ｔ９`;
DROP TABLE `Ｔ１０`;
DROP TABLE `Ｔ１１`;
DROP TABLE `Ｔ１２`;
