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

66 lines
2.9 KiB
Text
Raw Normal View History

--source include/have_utf8.inc
--source include/have_innodb.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 ``;
--enable_warnings
#
# Test LENGTH() 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 = MEMORY;
CREATE TABLE `` (`` char(5), INDEX(``)) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `` (`` char(5), INDEX(``)) DEFAULT CHARSET = utf8 engine = MEMORY;
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 ``, LENGTH(``) FROM ``;
SELECT ``, LENGTH(``) FROM ``;
SELECT ``, LENGTH(``) FROM ``;
#MyISAM
SELECT ``, LENGTH(``) FROM ``;
SELECT ``, LENGTH(``) FROM ``;
SELECT ``, LENGTH(``) FROM ``;
#MEMORY
SELECT ``, LENGTH(``) FROM ``;
SELECT ``, LENGTH(``) FROM ``;
SELECT ``, LENGTH(``) FROM ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;