~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/suite/jp/t/jp_where_sjis.test

  • Committer: Brian Aker
  • Date: 2010-01-29 23:22:38 UTC
  • mfrom: (1271.4.1 drizzle)
  • Revision ID: brian@gaz-20100129232238-gb6hplbbbdgf9xaz
Merged Lee, enabled jp tests by default.

Show diffs side-by-side

added added

removed removed

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