mariadb/mysql-test/suite/jp/t/jp_subquery_ucs2.test

144 lines
7.8 KiB
Text
Raw Normal View History

2005-01-07 09:40:29 +01:00
--source include/have_ucs2.inc
--disable_warnings
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD><D4A3><EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD><D4A3><EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD><D4A3><EFBFBD>`;
--enable_warnings
#
# Test subquery using Japanese characters in ucs2 encoding
#
SET NAMES ujis;
SET character_set_database = ucs2;
SET collation_connection = ucs2_general_ci;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` (`<60>ã<EFBFBD>` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
#insert the following data in each table
# jisx0201 hankaku-katakana data
# jisx0208 data
# jisx0212 supplemental character data
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><><EFBFBD>'),('<27><><EFBFBD>'),('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><><EFBFBD>'),('<27><><EFBFBD>'),('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD>a` VALUES ('<27><><EFBFBD>'),('<27><><EFBFBD>'),('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD>b` VALUES ('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` VALUES ('<27><>');
INSERT INTO `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` VALUES ('<27><><EFBFBD>'),('<27><><EFBFBD>'),('<27><><EFBFBD>');
INSERT INTO `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` VALUES ('<27><><EFBFBD>');
#Test for innodb
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD>b` WHERE `<60>ԣ<EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` WHERE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` WHERE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` WHERE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` WHERE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE `<60>ã<EFBFBD>` IN (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` WHERE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`.`<60>ã<EFBFBD>`);
SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>a` WHERE NOT EXISTS (SELECT `<60>ã<EFBFBD>` FROM `<60>ԣ<EFBFBD><D4A3><EFBFBD>b` WHERE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`.`<60>ã<EFBFBD>` = `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`.`<60>ã<EFBFBD>`);
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`;
DROP TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>a`;
DROP TABLE `<60>ԣ<EFBFBD><D4A3><EFBFBD>b`;