Current Path : /compat/linux/proc/68247/cwd/home/usr.opt/mysql57/mysql-test/suite/jp/include/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/68247/cwd/home/usr.opt/mysql57/mysql-test/suite/jp/include/trim_sjis.inc |
# # Test TRIM() function with Japanese characters sjis encoding # --source include/have_sjis.inc --character_set sjis SET NAMES sjis; SET character_set_database = sjis; --disable_warnings DROP TABLE IF EXISTS `T1`; DROP TABLE IF EXISTS `T2`; DROP TABLE IF EXISTS `T3`; --enable_warnings --replace_result $engine <engine_to_be_tested> eval CREATE TABLE `T1` (`C1` CHAR(12), INDEX(`C1`)) DEFAULT CHARSET = sjis ENGINE = $engine; --replace_result $engine <engine_to_be_tested> eval CREATE TABLE `T2` (`C1` CHAR(12), INDEX(`C1`)) DEFAULT CHARSET = sjis ENGINE = $engine; --replace_result $engine <engine_to_be_tested> eval CREATE TABLE `T3` (`C1` CHAR(12), INDEX(`C1`)) DEFAULT CHARSET = sjis ENGINE = $engine; # Nothing to trim INSERT INTO `T1` VALUES ('アイウエオ'); # Test data for TRIM(TRAILING [remstr] FROM str) INSERT INTO `T1` VALUES ('アイウエオカ'); INSERT INTO `T1` VALUES ('アイウエオカカ'); INSERT INTO `T1` VALUES ('アイウエオカカカ'); # Test data for TRIM(LEADING [remstr] FROM str) INSERT INTO `T1` VALUES ('カアイウエオ'); INSERT INTO `T1` VALUES ('カカアイウエオ'); INSERT INTO `T1` VALUES ('カカカアイウエオ'); # Test data for TRIM(BOTH [remstr] FROM str) INSERT INTO `T1` VALUES ('カカカアイウエオカカカ'); # Test data for TRIM without [remstr] (remove spaces) INSERT INTO `T1` VALUES (' アイウエオ '); INSERT INTO `T2` VALUES ('あいうえお'); INSERT INTO `T2` VALUES ('あいうえおか'); INSERT INTO `T2` VALUES ('あいうえおかか'); INSERT INTO `T2` VALUES ('あいうえおかかか'); INSERT INTO `T2` VALUES ('かあいうえお'); INSERT INTO `T2` VALUES ('かかあいうえお'); INSERT INTO `T2` VALUES ('かかかあいうえお'); INSERT INTO `T2` VALUES ('かかかあいうえおかかか'); INSERT INTO `T2` VALUES (' あいうえお '); INSERT INTO `T3` VALUES ('ソ十表予構'); INSERT INTO `T3` VALUES ('ソ十表予構暴'); INSERT INTO `T3` VALUES ('ソ十表予構暴暴'); INSERT INTO `T3` VALUES ('ソ十表予構暴暴暴'); INSERT INTO `T3` VALUES ('暴ソ十表予構'); INSERT INTO `T3` VALUES ('暴暴ソ十表予構'); INSERT INTO `T3` VALUES ('暴暴暴ソ十表予構'); INSERT INTO `T3` VALUES ('暴暴暴ソ十表予構暴暴暴'); INSERT INTO `T3` VALUES (' ソ十表予構 '); SELECT `C1`,TRIM(TRAILING 'カ' FROM `C1`) FROM `T1`; SELECT `C1`,TRIM(LEADING 'カ' FROM `C1`) FROM `T1`; SELECT `C1`,TRIM(BOTH 'カ' FROM `C1`) FROM `T1`; SELECT `C1`,TRIM(`C1`) FROM `T1`; SELECT `C1`,TRIM(TRAILING 'か' FROM `C1`) FROM `T2`; SELECT `C1`,TRIM(LEADING 'か' FROM `C1`) FROM `T2`; SELECT `C1`,TRIM(BOTH 'か' FROM `C1`) FROM `T2`; SELECT `C1`,TRIM(`C1`) FROM `T2`; SELECT `C1`,TRIM(TRAILING '暴' FROM `C1`) FROM `T3`; SELECT `C1`,TRIM(LEADING '暴' FROM `C1`) FROM `T3`; SELECT `C1`,TRIM(BOTH '暴' FROM `C1`) FROM `T3`; SELECT `C1`,TRIM(`C1`) FROM `T3`; DROP TABLE `T1`; DROP TABLE `T2`; DROP TABLE `T3`;