Current Path : /home/usr.opt/mysql57/mysql-test/suite/jp/t/ |
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 : //home/usr.opt/mysql57/mysql-test/suite/jp/t/jp_union_ujis.test |
--source include/have_ujis.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 UNION with Japanese characters in ujis encoding # SET NAMES ujis; SET character_set_database = ujis; #InnoDB CREATE TABLE `」ヤ」ア` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = innodb; CREATE TABLE `」ヤ」イ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = innodb; CREATE TABLE `」ヤ」ウ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = innodb; INSERT INTO `」ヤ」ア` VALUES('竺'),('竺'),('、「'),('、「'),('常ワ'),('常ワ'); INSERT INTO `」ヤ」イ` VALUES('軸'),('軸'),('、、'),('、、'),('常ン'),('常ン'); INSERT INTO `」ヤ」ウ` VALUES('宍'),('宍'),('、ヲ'),('、ヲ'),('常゙'),('常゙'); SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; (SELECT * FROM `」ヤ」ア`) UNION (SELECT * FROM `」ヤ」イ`) UNION (SELECT '、ヲ') ORDER BY `」テ」ア`; (SELECT '、ヲ' AS `」テ」ア`) UNION (SELECT * FROM `」ヤ」ア`) UNION (SELECT * FROM `」ヤ」イ`) ORDER BY `」テ」ア`; SELECT `」テ」ア`, COUNT(*) FROM `」ヤ」ア` GROUP BY `」テ」ア` UNION SELECT `」テ」ア`, COUNT(*) FROM `」ヤ」イ` GROUP BY `」テ」ア` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` UNION ALL SELECT * FROM `」ヤ」ウ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` UNION DISTINCT SELECT * FROM `」ヤ」ウ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION SELECT REPEAT(`」テ」ア`,5) FROM `」ヤ」イ` ORDER BY `」テ」ア`; DROP TABLE `」ヤ」ア` ; DROP TABLE `」ヤ」イ` ; DROP TABLE `」ヤ」ウ` ; #MyISAM CREATE TABLE `」ヤ」ア` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MYISAM; CREATE TABLE `」ヤ」イ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MYISAM; CREATE TABLE `」ヤ」ウ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MYISAM; INSERT INTO `」ヤ」ア` VALUES('竺'),('竺'),('、「'),('、「'),('常ワ'),('常ワ'); INSERT INTO `」ヤ」イ` VALUES('軸'),('軸'),('、、'),('、、'),('常ン'),('常ン'); INSERT INTO `」ヤ」ウ` VALUES('宍'),('宍'),('、ヲ'),('、ヲ'),('常゙'),('常゙'); SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; (SELECT * FROM `」ヤ」ア`) UNION (SELECT * FROM `」ヤ」イ`) UNION (SELECT '、ヲ') ORDER BY `」テ」ア`; (SELECT '、ヲ' AS `」テ」ア`) UNION (SELECT * FROM `」ヤ」ア`) UNION (SELECT * FROM `」ヤ」イ`) ORDER BY `」テ」ア`; SELECT `」テ」ア`, COUNT(*) FROM `」ヤ」ア` GROUP BY `」テ」ア` UNION SELECT `」テ」ア`, COUNT(*) FROM `」ヤ」イ` GROUP BY `」テ」ア` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` UNION ALL SELECT * FROM `」ヤ」ウ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` UNION DISTINCT SELECT * FROM `」ヤ」ウ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION SELECT REPEAT(`」テ」ア`,5) FROM `」ヤ」イ` ORDER BY `」テ」ア`; DROP TABLE `」ヤ」ア` ; DROP TABLE `」ヤ」イ` ; DROP TABLE `」ヤ」ウ` ; #MEMORY CREATE TABLE `」ヤ」ア` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MEMORY; CREATE TABLE `」ヤ」イ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MEMORY; CREATE TABLE `」ヤ」ウ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MEMORY; INSERT INTO `」ヤ」ア` VALUES('竺'),('竺'),('、「'),('、「'),('常ワ'),('常ワ'); INSERT INTO `」ヤ」イ` VALUES('軸'),('軸'),('、、'),('、、'),('常ン'),('常ン'); INSERT INTO `」ヤ」ウ` VALUES('宍'),('宍'),('、ヲ'),('、ヲ'),('常゙'),('常゙'); SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; (SELECT * FROM `」ヤ」ア`) UNION (SELECT * FROM `」ヤ」イ`) UNION (SELECT '、ヲ') ORDER BY `」テ」ア`; (SELECT '、ヲ' AS `」テ」ア`) UNION (SELECT * FROM `」ヤ」ア`) UNION (SELECT * FROM `」ヤ」イ`) ORDER BY `」テ」ア`; SELECT `」テ」ア`, COUNT(*) FROM `」ヤ」ア` GROUP BY `」テ」ア` UNION SELECT `」テ」ア`, COUNT(*) FROM `」ヤ」イ` GROUP BY `」テ」ア` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` UNION ALL SELECT * FROM `」ヤ」ウ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` UNION DISTINCT SELECT * FROM `」ヤ」ウ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION SELECT REPEAT(`」テ」ア`,5) FROM `」ヤ」イ` ORDER BY `」テ」ア`; DROP TABLE `」ヤ」ア` ; DROP TABLE `」ヤ」イ` ; DROP TABLE `」ヤ」ウ` ; # Test mixed strage engine CREATE TABLE `」ヤ」ア` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = InnoDB; CREATE TABLE `」ヤ」イ` (`」テ」ア` char(1), INDEX(`」テ」ア`)) DEFAULT CHARSET = ujis engine = MyISAM; INSERT INTO `」ヤ」ア` VALUES('竺'),('竺'),('、「'),('、「'),('常ワ'),('常ワ'); INSERT INTO `」ヤ」イ` VALUES('軸'),('軸'),('、、'),('、、'),('常ン'),('常ン'); SELECT * FROM `」ヤ」ア` UNION DISTINCT SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; SELECT * FROM `」ヤ」ア` UNION ALL SELECT * FROM `」ヤ」イ` ORDER BY `」テ」ア`; DROP TABLE `」ヤ」ア`; DROP TABLE `」ヤ」イ`;