mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
77bc68f99d
Change mode to -rw-rw----
422 lines
7.2 KiB
Text
422 lines
7.2 KiB
Text
drop table if exists `T1`;
|
||
drop table if exists `T2`;
|
||
drop table if exists `T3`;
|
||
drop table if exists `T4`;
|
||
drop table if exists `T5`;
|
||
drop table if exists `T6`;
|
||
drop table if exists `T7`;
|
||
drop table if exists `T8`;
|
||
drop table if exists `T9`;
|
||
drop table if exists `T10`;
|
||
drop table if exists `T11`;
|
||
drop table if exists `T12`;
|
||
SET NAMES ujis;
|
||
SET character_set_database = ujis;
|
||
CREATE TABLE `T1` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = innodb;
|
||
CREATE TABLE `T2` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = innodb;
|
||
CREATE TABLE `T3` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = innodb;
|
||
INSERT INTO `T1` VALUES('ア'),('ア'),('あ'),('あ'),('龔'),('龔');
|
||
INSERT INTO `T2` VALUES('イ'),('イ'),('い'),('い'),('龖'),('龖');
|
||
INSERT INTO `T3` VALUES('ウ'),('ウ'),('う'),('う'),('龗'),('龗');
|
||
SELECT * FROM `T1` UNION DISTINCT SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
ア
|
||
イ
|
||
イ
|
||
龔
|
||
龔
|
||
龖
|
||
龖
|
||
あ
|
||
あ
|
||
い
|
||
い
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
C1 COUNT(*)
|
||
ア 2
|
||
イ 2
|
||
龔 2
|
||
龖 2
|
||
あ 2
|
||
い 2
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
う
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イイイイイ
|
||
龔
|
||
龖龖龖龖龖
|
||
あ
|
||
いいいいい
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
CREATE TABLE `T1` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MYISAM;
|
||
CREATE TABLE `T2` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MYISAM;
|
||
CREATE TABLE `T3` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MYISAM;
|
||
INSERT INTO `T1` VALUES('ア'),('ア'),('あ'),('あ'),('龔'),('龔');
|
||
INSERT INTO `T2` VALUES('イ'),('イ'),('い'),('い'),('龖'),('龖');
|
||
INSERT INTO `T3` VALUES('ウ'),('ウ'),('う'),('う'),('龗'),('龗');
|
||
SELECT * FROM `T1` UNION DISTINCT SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
ア
|
||
イ
|
||
イ
|
||
龔
|
||
龔
|
||
龖
|
||
龖
|
||
あ
|
||
あ
|
||
い
|
||
い
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
C1 COUNT(*)
|
||
ア 2
|
||
イ 2
|
||
龔 2
|
||
龖 2
|
||
あ 2
|
||
い 2
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
う
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イイイイイ
|
||
龔
|
||
龖龖龖龖龖
|
||
あ
|
||
いいいいい
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
CREATE TABLE `T1` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = HEAP;
|
||
CREATE TABLE `T2` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = HEAP;
|
||
CREATE TABLE `T3` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = HEAP;
|
||
INSERT INTO `T1` VALUES('ア'),('ア'),('あ'),('あ'),('龔'),('龔');
|
||
INSERT INTO `T2` VALUES('イ'),('イ'),('い'),('い'),('龖'),('龖');
|
||
INSERT INTO `T3` VALUES('ウ'),('ウ'),('う'),('う'),('龗'),('龗');
|
||
SELECT * FROM `T1` UNION DISTINCT SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
ア
|
||
イ
|
||
イ
|
||
龔
|
||
龔
|
||
龖
|
||
龖
|
||
あ
|
||
あ
|
||
い
|
||
い
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
C1 COUNT(*)
|
||
ア 2
|
||
イ 2
|
||
龔 2
|
||
龖 2
|
||
あ 2
|
||
い 2
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
う
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イイイイイ
|
||
龔
|
||
龖龖龖龖龖
|
||
あ
|
||
いいいいい
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
CREATE TABLE `T1` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = BDB;
|
||
CREATE TABLE `T2` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = BDB;
|
||
CREATE TABLE `T3` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = BDB;
|
||
INSERT INTO `T1` VALUES('ア'),('ア'),('あ'),('あ'),('龔'),('龔');
|
||
INSERT INTO `T2` VALUES('イ'),('イ'),('い'),('い'),('龖'),('龖');
|
||
INSERT INTO `T3` VALUES('ウ'),('ウ'),('う'),('う'),('龗'),('龗');
|
||
SELECT * FROM `T1` UNION DISTINCT SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
ア
|
||
イ
|
||
イ
|
||
龔
|
||
龔
|
||
龖
|
||
龖
|
||
あ
|
||
あ
|
||
い
|
||
い
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
う
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
C1 COUNT(*)
|
||
ア 2
|
||
イ 2
|
||
龔 2
|
||
龖 2
|
||
あ 2
|
||
い 2
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
う
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
ウ
|
||
龔
|
||
龖
|
||
龗
|
||
あ
|
||
い
|
||
う
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イイイイイ
|
||
龔
|
||
龖龖龖龖龖
|
||
あ
|
||
いいいいい
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
CREATE TABLE `T1` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = InnoDB;
|
||
CREATE TABLE `T2` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MyISAM;
|
||
INSERT INTO `T1` VALUES('ア'),('ア'),('あ'),('あ'),('龔'),('龔');
|
||
INSERT INTO `T2` VALUES('イ'),('イ'),('い'),('い'),('龖'),('龖');
|
||
SELECT * FROM `T1` UNION DISTINCT SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
イ
|
||
龔
|
||
龖
|
||
あ
|
||
い
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
C1
|
||
ア
|
||
ア
|
||
イ
|
||
イ
|
||
龔
|
||
龔
|
||
龖
|
||
龖
|
||
あ
|
||
あ
|
||
い
|
||
い
|
||
DROP TABLE `T1`;
|
||
DROP TABLE `T2`;
|