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

164 lines
6.4 KiB
Text
Raw Normal View History

--character_set sjis
--disable_warnings
drop table if exists `<60>s<EFBFBD>P`;
drop table if exists `<60>s<EFBFBD>Q`;
drop table if exists `<60>s<EFBFBD>R`;
drop table if exists `<60>s<EFBFBD>S`;
drop table if exists `<60>s<EFBFBD>T`;
drop table if exists `<60>s<EFBFBD>U`;
drop table if exists `<60>s<EFBFBD>V`;
drop table if exists `<60>s<EFBFBD>W`;
drop table if exists `<60>s<EFBFBD>X`;
drop table if exists `<60>s<EFBFBD>P<EFBFBD>O`;
--enable_warnings
#
# Test RTRIM() function with Japanese characters in sjis encoding
#
SET NAMES sjis;
SET character_set_database = sjis;
CREATE TABLE `<60>s<EFBFBD>P` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `<60>s<EFBFBD>Q` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `<60>s<EFBFBD>R` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `<60>s<EFBFBD>S` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `<60>s<EFBFBD>T` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `<60>s<EFBFBD>U` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `<60>s<EFBFBD>V` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `<60>s<EFBFBD>W` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `<60>s<EFBFBD>X` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>O` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>P` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>Q` (`<60>b<EFBFBD>P` char(8), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = bdb;
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\ ');
# Double byte spaces are not supposed to be trimed
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\<5C>\<5C>\<5C>\<5C>\<5C>@<40>@<40>@');
#InnoDB
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>P`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>Q`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>R`;
#MyISAM
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>S`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>T`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>U`;
#HEAP
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>V`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>W`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>X`;
#BDB
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>P<EFBFBD>O`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>P<EFBFBD>P`;
SELECT RTRIM(`<60>b<EFBFBD>P`) from `<60>s<EFBFBD>P<EFBFBD>Q`;
DROP TABLE `<60>s<EFBFBD>P`;
DROP TABLE `<60>s<EFBFBD>Q`;
DROP TABLE `<60>s<EFBFBD>R`;
DROP TABLE `<60>s<EFBFBD>S`;
DROP TABLE `<60>s<EFBFBD>T`;
DROP TABLE `<60>s<EFBFBD>U`;
DROP TABLE `<60>s<EFBFBD>V`;
DROP TABLE `<60>s<EFBFBD>W`;
DROP TABLE `<60>s<EFBFBD>X`;
DROP TABLE `<60>s<EFBFBD>P<EFBFBD>O`;
DROP TABLE `<60>s<EFBFBD>P<EFBFBD>P`;
DROP TABLE `<60>s<EFBFBD>P<EFBFBD>Q`;