~vadim-tk/percona-server/percona-galera-5.1.57

« back to all changes in this revision

Viewing changes to mysql-test/suite/jp/t/jp_where_sjis.test

  • Committer: root
  • Date: 2011-07-10 16:09:24 UTC
  • Revision ID: root@r815.office.percona.com-20110710160924-fyffqsbaclgu6vui
Initial port

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/have_sjis.inc
 
2
--source include/have_innodb.inc
 
3
--character_set sjis
 
4
--disable_warnings
 
5
drop table if exists `�s�P`;
 
6
drop table if exists `�s�Q`;
 
7
drop table if exists `�s�R`;
 
8
drop table if exists `�s�S`;
 
9
drop table if exists `�s�T`;
 
10
drop table if exists `�s�U`;
 
11
drop table if exists `�s�V`;
 
12
drop table if exists `�s�W`;
 
13
drop table if exists `�s�X`;
 
14
--enable_warnings
 
15
 
 
16
#
 
17
# Test Displaying Japanese charact using WHERE condtion in sjis encoding
 
18
#
 
19
 
 
20
SET NAMES sjis;
 
21
SET character_set_database = sjis;
 
22
 
 
23
CREATE TABLE `�s�P` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = innodb;
 
24
CREATE TABLE `�s�Q` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = innodb;
 
25
CREATE TABLE `�s�R` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = innodb;
 
26
CREATE TABLE `�s�S` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = myisam;
 
27
CREATE TABLE `�s�T` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = myisam;
 
28
CREATE TABLE `�s�U` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = myisam;
 
29
CREATE TABLE `�s�V` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = MEMORY;
 
30
CREATE TABLE `�s�W` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = MEMORY;
 
31
CREATE TABLE `�s�X` (`�b�P` char(20), INDEX(`�b�P`)) DEFAULT CHARSET = sjis engine = MEMORY;
 
32
 
 
33
#Load the following data in each table
 
34
# jisx0201 hankaku-katakana data
 
35
# jisx0208 data
 
36
# jisx0212 supplemental character data
 
37
 
 
38
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�P`;
 
39
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�Q`;
 
40
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�R`;
 
41
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�S`;
 
42
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�T`;
 
43
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�U`;
 
44
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `�s�V`;
 
45
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `�s�W`;
 
46
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `�s�X`;
 
47
 
 
48
#InnoDB
 
49
SELECT * FROM `�s�P` WHERE `�b�P` = '����������������';
 
50
SELECT * FROM `�s�Q` WHERE `�b�P` = '�E��������������������������������������';
 
51
SELECT * FROM `�s�R` WHERE `�b�P` = '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';
 
52
 
 
53
#MyISAM
 
54
SELECT * FROM `�s�S` WHERE `�b�P` = '����������������';
 
55
SELECT * FROM `�s�T` WHERE `�b�P` = '�E��������������������������������������';
 
56
SELECT * FROM `�s�U` WHERE `�b�P` = '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';
 
57
 
 
58
#MEMORY
 
59
SELECT * FROM `�s�V` WHERE `�b�P` = '����������������';
 
60
SELECT * FROM `�s�W` WHERE `�b�P` = '�E��������������������������������������';
 
61
SELECT * FROM `�s�X` WHERE `�b�P` = '�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\';
 
62
 
 
63
#Test to distinguish 0x9353 and 0x9373
 
64
--disable_warnings
 
65
DROP TABLE IF EXISTS t1;
 
66
DROP TABLE IF EXISTS t2;
 
67
DROP TABLE IF EXISTS t3;
 
68
--enable_warnings
 
69
CREATE TABLE t1(c1 char(1)) default charset = sjis engine=innodb;
 
70
CREATE TABLE t2(c1 char(1)) default charset = sjis engine=myisam;
 
71
CREATE TABLE t3(c1 char(1)) default charset = sjis engine=MEMORY;
 
72
INSERT INTO t1 VALUES('�S'),('�s');
 
73
INSERT INTO t2 VALUES('�S'),('�s');
 
74
INSERT INTO t3 VALUES('�S'),('�s');
 
75
SELECT * FROM t1 WHERE c1 = '�S';
 
76
SELECT * FROM t2 WHERE c1 = '�S';
 
77
SELECT * FROM t3 WHERE c1 = '�S';
 
78
SELECT * FROM t1 WHERE c1 = '�s';
 
79
SELECT * FROM t2 WHERE c1 = '�s';
 
80
SELECT * FROM t3 WHERE c1 = '�s';
 
81
DROP TABLE t1;
 
82
DROP TABLE t2;
 
83
DROP TABLE t3;
 
84
 
 
85
DROP TABLE `�s�P`;
 
86
DROP TABLE `�s�Q`;
 
87
DROP TABLE `�s�R`;
 
88
DROP TABLE `�s�S`;
 
89
DROP TABLE `�s�T`;
 
90
DROP TABLE `�s�U`;
 
91
DROP TABLE `�s�V`;
 
92
DROP TABLE `�s�W`;
 
93
DROP TABLE `�s�X`;