mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
464c2de70a
Bug#28563 Test suite "jp" fails completely - The main goal of this fix is to make the "jp" suite runnable in general and to make it more robust for use in pushbuild under build team conditions. - It was decided to fix the remaining heavy issues within the architecture of this test later (-> WL 4327 Redesign the 'jp' testsuite for build team testing conditions) Only the test jp_trim_sjis got some significant improvements of its architecture (Just as proof of concept for the other tests). - Tests suffering from Bug 36597 Testsuite "jp": Suspicious results for some tests (unexpected result sets) were disabled - *.opt files were used to avoid differences on OS (Windows) because of case sensitive tablenames within the tests
103 lines
4.8 KiB
Text
103 lines
4.8 KiB
Text
--source include/have_ujis.inc
|
||
--source include/have_innodb.inc
|
||
|
||
--disable_warnings
|
||
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`;
|
||
--enable_warnings
|
||
|
||
#
|
||
# Test UNION with Japanese characters in ujis encoding
|
||
#
|
||
|
||
SET NAMES ujis;
|
||
SET character_set_database = ujis;
|
||
|
||
#InnoDB
|
||
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`;
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
|
||
#MyISAM
|
||
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`;
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
|
||
#MEMORY
|
||
CREATE TABLE `T1` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MEMORY;
|
||
CREATE TABLE `T2` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MEMORY;
|
||
CREATE TABLE `T3` (`C1` char(1), INDEX(`C1`)) DEFAULT CHARSET = ujis engine = MEMORY;
|
||
INSERT INTO `T1` VALUES('ア'),('ア'),('あ'),('あ'),('龔'),('龔');
|
||
INSERT INTO `T2` VALUES('イ'),('イ'),('い'),('い'),('龖'),('龖');
|
||
INSERT INTO `T3` VALUES('ウ'),('ウ'),('う'),('う'),('龗'),('龗');
|
||
SELECT * FROM `T1` UNION DISTINCT SELECT * FROM `T2` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
(SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) UNION (SELECT 'う') ORDER BY `C1`;
|
||
(SELECT 'う' AS `C1`) UNION (SELECT * FROM `T1`) UNION (SELECT * FROM `T2`) ORDER BY `C1`;
|
||
SELECT `C1`, COUNT(*) FROM `T1` GROUP BY `C1` UNION
|
||
SELECT `C1`, COUNT(*) FROM `T2` GROUP BY `C1` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION DISTINCT
|
||
SELECT * FROM `T2` UNION ALL
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION ALL
|
||
SELECT * FROM `T2` UNION DISTINCT
|
||
SELECT * FROM `T3` ORDER BY `C1`;
|
||
SELECT * FROM `T1` UNION SELECT REPEAT(`C1`,5) FROM `T2` ORDER BY `C1`;
|
||
DROP TABLE `T1` ;
|
||
DROP TABLE `T2` ;
|
||
DROP TABLE `T3` ;
|
||
|
||
# Test mixed strage engine
|
||
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`;
|
||
SELECT * FROM `T1` UNION ALL SELECT * FROM `T2` ORDER BY `C1`;
|
||
DROP TABLE `T1`;
|
||
DROP TABLE `T2`;
|