mariadb/mysql-test/suite/jp/t/jp_trim_utf8.test
serg@sergbook.mysql.com 77bc68f99d Many files:
Change mode to -rw-rw----
2005-01-07 14:32:05 +02:00

218 lines
11 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--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 TRIM() function with Japanese characters utf8 encoding
#
SET NAMES utf8;
SET character_set_database = utf8;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `` (`` char(12), INDEX(``)) DEFAULT CHARSET = utf8 engine = bdb;
# Nothing to trim
INSERT INTO `` VALUES ('アイウエオ');
# Test data for TRIM(TRAILING [remstr] FROM str)
INSERT INTO `` VALUES ('アイウエオカ');
INSERT INTO `` VALUES ('アイウエオカカ');
INSERT INTO `` VALUES ('アイウエオカカカ');
# Test data for TRIM(LEADING [remstr] FROM str)
INSERT INTO `` VALUES ('カアイウエオ');
INSERT INTO `` VALUES ('カカアイウエオ');
INSERT INTO `` VALUES ('カカカアイウエオ');
# Test data for TRIM(BOTH [remstr] FROM str)
INSERT INTO `` VALUES ('カカカアイウエオカカカ');
# Test data for TRIM without [remstr] (remove spaces)
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 ('龔龖龗龞龡丂');
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 ('カアイウエオ');
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 ('かかかあいうえおかかか');
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 ('アイウエオカ');
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 ('かあいうえお');
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 ('丂丂丂龔龖龗龞龡丂丂丂');
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 ('あいうえおか');
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 ('丂龔龖龗龞龡');
INSERT INTO `` VALUES ('丂丂龔龖龗龞龡');
INSERT INTO `` VALUES ('丂丂丂龔龖龗龞龡');
INSERT INTO `` VALUES ('丂丂丂龔龖龗龞龡丂丂丂');
INSERT INTO `` VALUES (' 龔龖龗龞龡 ');
#InnoDB
SELECT ``,TRIM(TRAILING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'か' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING '丂'FROM ``) FROM ``;
SELECT ``,TRIM(LEADING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH '丂' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
#MyISAM
SELECT ``,TRIM(TRAILING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'か' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH '丂' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
#HEAP
SELECT ``,TRIM(TRAILING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'か' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH '丂' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
#BDB
SELECT ``,TRIM(TRAILING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'カ' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING 'か' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH 'か' FROM ``) FROM ``;
SELECT ``,TRIM(``) FROM ``;
SELECT ``,TRIM(TRAILING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(LEADING '丂' FROM ``) FROM ``;
SELECT ``,TRIM(BOTH '丂' FROM ``) FROM ``;
SELECT ``,TRIM(``) 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 ``;