mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
77bc68f99d
Change mode to -rw-rw----
219 lines
9.2 KiB
Text
219 lines
9.2 KiB
Text
--character_set sjis
|
||
--disable_warnings
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><>`;
|
||
drop table if exists `<60><><EFBFBD>`;
|
||
--enable_warnings
|
||
|
||
#
|
||
# Test TRIM() function with Japanese characters sjis encoding
|
||
#
|
||
|
||
SET NAMES sjis;
|
||
SET character_set_database = sjis;
|
||
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = innodb;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = innodb;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = innodb;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = myisam;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = myisam;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = myisam;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = heap;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = heap;
|
||
CREATE TABLE `<60><>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = heap;
|
||
CREATE TABLE `<60><><EFBFBD>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = bdb;
|
||
CREATE TABLE `<60><><EFBFBD>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = bdb;
|
||
CREATE TABLE `<60><><EFBFBD>` (`<60><>` char(12), INDEX(`<60><>`)) DEFAULT CHARSET = sjis engine = bdb;
|
||
|
||
# Nothing to trim
|
||
INSERT INTO `<60><>` VALUES ('捲陷<E68DB2>');
|
||
# Test data for TRIM(TRAILING [remstr] FROM str)
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮<E999B7>');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮順');
|
||
# Test data for TRIM(LEADING [remstr] FROM str)
|
||
INSERT INTO `<60><>` VALUES ('雇眾斯');
|
||
INSERT INTO `<60><>` VALUES ('順捲陷<E68DB2>');
|
||
INSERT INTO `<60><>` VALUES ('順雇眾斯');
|
||
# Test data for TRIM(BOTH [remstr] FROM str)
|
||
INSERT INTO `<60><>` VALUES ('順雇眾斯順<E696AF>');
|
||
# Test data for TRIM without [remstr] (remove spaces)
|
||
INSERT INTO `<60><>` VALUES (' 捲陷<E68DB2> ');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES (' <20><><EFBFBD><EFBFBD><EFBFBD> ');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀䓀');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><>` VALUES ('䓀<>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><>` VALUES (' <20>蕚𦖭珢㙡 ');
|
||
|
||
INSERT INTO `<60><>` VALUES ('捲陷<E68DB2>');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮<E999B7>');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮順');
|
||
INSERT INTO `<60><>` VALUES ('雇眾斯');
|
||
INSERT INTO `<60><>` VALUES ('順捲陷<E68DB2>');
|
||
INSERT INTO `<60><>` VALUES ('順雇眾斯');
|
||
INSERT INTO `<60><>` VALUES ('順雇眾斯順<E696AF>');
|
||
INSERT INTO `<60><>` VALUES (' 捲陷<E68DB2> ');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES (' <20><><EFBFBD><EFBFBD><EFBFBD> ');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀䓀');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><>` VALUES ('䓀<>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><>` VALUES (' <20>蕚𦖭珢㙡 ');
|
||
|
||
INSERT INTO `<60><>` VALUES ('捲陷<E68DB2>');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮<E999B7>');
|
||
INSERT INTO `<60><>` VALUES ('捲陷絮順');
|
||
INSERT INTO `<60><>` VALUES ('雇眾斯');
|
||
INSERT INTO `<60><>` VALUES ('順捲陷<E68DB2>');
|
||
INSERT INTO `<60><>` VALUES ('順雇眾斯');
|
||
INSERT INTO `<60><>` VALUES ('順雇眾斯順<E696AF>');
|
||
INSERT INTO `<60><>` VALUES (' 捲陷<E68DB2> ');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><>` VALUES (' <20><><EFBFBD><EFBFBD><EFBFBD> ');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀䓀');
|
||
INSERT INTO `<60><>` VALUES ('<27>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><>` VALUES ('䓀<>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><>` VALUES (' <20>蕚𦖭珢㙡 ');
|
||
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('捲陷<E68DB2>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('捲陷絮');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('捲陷絮<E999B7>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('捲陷絮順');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('雇眾斯');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('順捲陷<E68DB2>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('順雇眾斯');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('順雇眾斯順<E696AF>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES (' 捲陷<E68DB2> ');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES (' <20><><EFBFBD><EFBFBD><EFBFBD> ');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27>蕚𦖭珢㙡䓀');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27>蕚𦖭珢㙡䓀䓀');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('<27>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('䓀<>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES ('䓀䓀䓀<E49380>蕚𦖭珢㙡䓀䓀䓀');
|
||
INSERT INTO `<60><><EFBFBD>` VALUES (' <20>蕚𦖭珢㙡 ');
|
||
|
||
#InnoDB
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '䓀'FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
|
||
#MyISAM
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
|
||
#HEAP
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(LEADING '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(BOTH '䓀' FROM `<60><>`) FROM `<60><>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><>`;
|
||
|
||
#BDB
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '<27>' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(LEADING '<27>' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(BOTH '<27>' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(TRAILING '䓀' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(LEADING '䓀' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(BOTH '䓀' FROM `<60><>`) FROM `<60><><EFBFBD>`;
|
||
SELECT `<60><>`,TRIM(`<60><>`) FROM `<60><><EFBFBD>`;
|
||
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><>`;
|
||
DROP TABLE `<60><><EFBFBD>`;
|
||
DROP TABLE `<60><><EFBFBD>`;
|
||
DROP TABLE `<60><><EFBFBD>`;
|