mariadb/mysql-test/suite/jp/t/jp_subquery_ucs2.test
serg@sergbook.mysql.com 77bc68f99d Many files:
Change mode to -rw-rw----
2005-01-07 14:32:05 +02:00

143 lines
7.8 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_ucs2.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 `£Ô£¹`;
drop table if exists `£Ô£±£°`;
drop table if exists `£Ô£±£±`;
drop table if exists `£Ô£±£²`;
--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 `£Ô£±a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `£Ô£±b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `£Ô£²a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `£Ô£²b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `£Ô£³a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `£Ô£³b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `£Ô£´a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `£Ô£´b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `£Ô£µa` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `£Ô£µb` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `£Ô£¶a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `£Ô£¶b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `£Ô£·a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£·b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£¸a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£¸b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£¹a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£¹b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£±£°a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£±£°b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£±£±a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£±£±b` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£±£²a` (`£Ã£±` char(1) PRIMARY KEY) DEFAULT CHARSET = ucs2 engine = heap;
CREATE TABLE `£Ô£±£²b` (`£Ã£±` 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 `£Ô£±a` VALUES ('Ž±'),('Ž¶'),('Ž»');
INSERT INTO `£Ô£±b` VALUES ('Ž±');
INSERT INTO `£Ô£²a` VALUES ('¤¢'),('¤«'),('¤µ');
INSERT INTO `£Ô£²b` VALUES ('¤¢');
INSERT INTO `£Ô£³a` VALUES ('<27>íÜ'),('<27>íÝ'),('<27>íÞ');
INSERT INTO `£Ô£³b` VALUES ('<27>íÜ');
INSERT INTO `£Ô£´a` VALUES ('Ž±'),('Ž¶'),('Ž»');
INSERT INTO `£Ô£´b` VALUES ('Ž±');
INSERT INTO `£Ô£µa` VALUES ('¤¢'),('¤«'),('¤µ');
INSERT INTO `£Ô£µb` VALUES ('¤¢');
INSERT INTO `£Ô£¶a` VALUES ('<27>íÜ'),('<27>íÝ'),('<27>íÞ');
INSERT INTO `£Ô£¶b` VALUES ('<27>íÜ');
INSERT INTO `£Ô£·a` VALUES ('Ž±'),('Ž¶'),('Ž»');
INSERT INTO `£Ô£·b` VALUES ('Ž±');
INSERT INTO `£Ô£¸a` VALUES ('¤¢'),('¤«'),('¤µ');
INSERT INTO `£Ô£¸b` VALUES ('¤¢');
INSERT INTO `£Ô£¹a` VALUES ('<27>íÜ'),('<27>íÝ'),('<27>íÞ');
INSERT INTO `£Ô£¹b` VALUES ('<27>íÜ');
INSERT INTO `£Ô£±£°a` VALUES ('Ž±'),('Ž¶'),('Ž»');
INSERT INTO `£Ô£±£°b` VALUES ('Ž±');
INSERT INTO `£Ô£±£±a` VALUES ('¤¢'),('¤«'),('¤µ');
INSERT INTO `£Ô£±£±b` VALUES ('¤¢');
INSERT INTO `£Ô£±£²a` VALUES ('<27>íÜ'),('<27>íÝ'),('<27>íÞ');
INSERT INTO `£Ô£±£²b` VALUES ('<27>íÜ');
#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`.`£Ã£±`);
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`.`£Ã£±`);
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`.`£Ã£±`);
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`;
DROP TABLE `£Ô£±£°a`;
DROP TABLE `£Ô£±£°b`;
DROP TABLE `£Ô£±£±a`;
DROP TABLE `£Ô£±£±b`;
DROP TABLE `£Ô£±£²a`;
DROP TABLE `£Ô£±£²b`;