~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
--character_set sjis
2
SET NAMES sjis;
3
SET character_set_database = sjis;
4
5
--disable_warnings
6
drop table if exists `‚s‚P`;
7
drop table if exists `‚s‚Q`;
8
drop table if exists `‚s‚R`;
9
drop table if exists `‚s‚S`;
10
drop table if exists `‚s‚T`;
11
drop table if exists `‚s‚U`;
12
drop table if exists `‚s‚V`;
13
drop table if exists `‚s‚W`;
14
drop table if exists `‚s‚X`;
15
drop table if exists `‚s‚P‚O`;
16
drop table if exists `‚s‚P‚P`;
17
drop table if exists `‚s‚P‚Q`;
18
--enable_warnings
19
20
#
21
# Test CONVERT() function with Japanese character in sjis encoding
22
#
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 = heap;
31
CREATE TABLE `‚s‚W` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
32
CREATE TABLE `‚s‚X` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
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 `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P`;
57
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P`;
58
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P`;
59
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚Q`;
60
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚Q`;
61
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚Q`;
62
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚R`;
63
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚R`;
64
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚R`;
65
66
#MyISAM
67
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚S`;
68
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚S`;
69
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚S`;
70
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚T`;
71
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚T`;
72
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚T`;
73
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚U`;
74
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚U`;
75
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚U`;
76
77
#Heap
78
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚V`;
79
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚V`;
80
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚V`;
81
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚W`;
82
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚W`;
83
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚W`;
84
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚X`;
85
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚X`;
86
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚X`;
87
88
#BDB
89
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚O`;
90
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚O`;
91
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚O`;
92
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚P`;
93
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚P`;
94
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚P`;
95
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚Q`;
96
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚Q`;
97
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚Q`;
98
99
drop table `‚s‚P`;
100
drop table `‚s‚Q`;
101
drop table `‚s‚R`;
102
drop table `‚s‚S`;
103
drop table `‚s‚T`;
104
drop table `‚s‚U`;
105
drop table `‚s‚V`;
106
drop table `‚s‚W`;
107
drop table `‚s‚X`;
108
drop table `‚s‚P‚O`;
109
drop table `‚s‚P‚P`;
110
drop table `‚s‚P‚Q`;