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 `sP`; |
|
7 |
drop table if exists `sQ`; |
|
8 |
drop table if exists `sR`; |
|
9 |
drop table if exists `sS`; |
|
10 |
drop table if exists `sT`; |
|
11 |
drop table if exists `sU`; |
|
12 |
drop table if exists `sV`; |
|
13 |
drop table if exists `sW`; |
|
14 |
drop table if exists `sX`; |
|
15 |
drop table if exists `sPO`; |
|
16 |
drop table if exists `sPP`; |
|
17 |
drop table if exists `sPQ`; |
|
18 |
--enable_warnings
|
|
19 |
||
20 |
#
|
|
21 |
# Test CONVERT() function with Japanese character in sjis encoding |
|
22 |
#
|
|
23 |
||
24 |
CREATE TABLE `sP` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb; |
|
25 |
CREATE TABLE `sQ` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb; |
|
26 |
CREATE TABLE `sR` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb; |
|
27 |
CREATE TABLE `sS` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam; |
|
28 |
CREATE TABLE `sT` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam; |
|
29 |
CREATE TABLE `sU` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam; |
|
30 |
CREATE TABLE `sV` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap; |
|
31 |
CREATE TABLE `sW` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap; |
|
32 |
CREATE TABLE `sX` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap; |
|
33 |
CREATE TABLE `sPO` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb; |
|
34 |
CREATE TABLE `sPP` (`bP` char(20), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb; |
|
35 |
CREATE TABLE `sPQ` (`bP` char(20), INDEX(`bP`)) 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 `sP`; |
|
43 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sQ`; |
|
44 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sR`; |
|
45 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sS`; |
|
46 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sT`; |
|
47 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sU`; |
|
48 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sV`; |
|
49 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sW`; |
|
50 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sX`; |
|
51 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `sPO`; |
|
52 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `sPP`; |
|
53 |
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `sPQ`; |
|
54 |
||
55 |
#InnoDB |
|
56 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sP`; |
|
57 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sP`; |
|
58 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sP`; |
|
59 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sQ`; |
|
60 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sQ`; |
|
61 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sQ`; |
|
62 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sR`; |
|
63 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sR`; |
|
64 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sR`; |
|
65 |
||
66 |
#MyISAM |
|
67 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sS`; |
|
68 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sS`; |
|
69 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sS`; |
|
70 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sT`; |
|
71 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sT`; |
|
72 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sT`; |
|
73 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sU`; |
|
74 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sU`; |
|
75 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sU`; |
|
76 |
||
77 |
#Heap |
|
78 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sV`; |
|
79 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sV`; |
|
80 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sV`; |
|
81 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sW`; |
|
82 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sW`; |
|
83 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sW`; |
|
84 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sX`; |
|
85 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sX`; |
|
86 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sX`; |
|
87 |
||
88 |
#BDB |
|
89 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sPO`; |
|
90 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sPO`; |
|
91 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sPO`; |
|
92 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sPP`; |
|
93 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sPP`; |
|
94 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sPP`; |
|
95 |
SELECT `bP`, CONVERT(`bP` using utf8) FROM `sPQ`; |
|
96 |
SELECT `bP`, CONVERT(`bP` using ucs2) FROM `sPQ`; |
|
97 |
SELECT `bP`, CONVERT(`bP` using ujis) FROM `sPQ`; |
|
98 |
||
99 |
drop table `sP`; |
|
100 |
drop table `sQ`; |
|
101 |
drop table `sR`; |
|
102 |
drop table `sS`; |
|
103 |
drop table `sT`; |
|
104 |
drop table `sU`; |
|
105 |
drop table `sV`; |
|
106 |
drop table `sW`; |
|
107 |
drop table `sX`; |
|
108 |
drop table `sPO`; |
|
109 |
drop table `sPP`; |
|
110 |
drop table `sPQ`; |