mariadb/mysql-test/suite/jp/t/jp_left_utf8.test

141 lines
6.7 KiB
Text
Raw Normal View History

--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 ``;
drop table if exists ``;
drop table if exists ``;
--enable_warnings
#
# Test LEFT() function with Japanese character 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 ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
#MyISAM
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
#HEAP
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
#BDB
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) FROM ``;
SELECT ``, LEFT(``,0) FROM ``;
SELECT ``, LEFT(``,1) FROM ``;
SELECT ``, LEFT(``,2) FROM ``;
SELECT ``, LEFT(``,3) FROM ``;
SELECT ``, LEFT(``,4) FROM ``;
SELECT ``, LEFT(``,5) 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 ``;