mariadb/mysql-test/suite/jp/t/jp_subquery_utf8.test
mleich@five.local.lan 464c2de70a Fix for
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
2008-05-15 18:01:13 +02:00

114 lines
6.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--source include/have_utf8.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 subquery using Japanese characters in utf8 encoding
#
SET NAMES utf8;
SET character_set_database = utf8;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = MEMORY;
#insert the following data in each table
# jisx0201 hankaku-katakana data
# jisx0208 data
# jisx0212 supplemental character data
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
#Test for innodb
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
#Test for myisam
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
#Test for memory
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE `` IN (SELECT `` FROM `b`);
SELECT `` FROM `a` WHERE EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
SELECT `` FROM `a` WHERE NOT EXISTS (SELECT `` FROM `b` WHERE `a`.`` = `b`.``);
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;