1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
--character_set sjis
--disable_warnings
drop table if exists `sP`;
drop table if exists `sQ`;
drop table if exists `sR`;
drop table if exists `sS`;
drop table if exists `sT`;
drop table if exists `sU`;
drop table if exists `sV`;
drop table if exists `sW`;
drop table if exists `sX`;
drop table if exists `sPO`;
drop table if exists `sPP`;
drop table if exists `sPQ`;
--enable_warnings
#
# Test LENGTH() function with Japanese character in sjis encoding
#
SET NAMES sjis;
SET character_set_database = sjis;
CREATE TABLE `sP` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `sQ` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `sR` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `sS` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `sT` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `sU` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `sV` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `sW` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `sX` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `sPO` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `sPP` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `sPQ` (`bP` char(5), INDEX(`bP`)) DEFAULT CHARSET = sjis engine = bdb;
INSERT INTO `sP` VALUES ('±²³Žµ'),('±²³Ž'),('±²³'),('±²'),('±'),('');
INSERT INTO `sQ` VALUES (' ¢€Šš'),(' ¢€Š'),(' ¢€'),(' ¢'),(' '),('');
INSERT INTO `sR` VALUES ('\\\\\'),('\\\\'),('\\\'),('\\'),('\'),('');
INSERT INTO `sS` VALUES ('±²³Žµ'),('±²³Ž'),('±²³'),('±²'),('±'),('');
INSERT INTO `sT` VALUES (' ¢€Šš'),(' ¢€Š'),(' ¢€'),(' ¢'),(' '),('');
INSERT INTO `sU` VALUES ('\\\\\'),('\\\\'),('\\\'),('\\'),('\'),('');
INSERT INTO `sV` VALUES ('±²³Žµ'),('±²³Ž'),('±²³'),('±²'),('±'),('');
INSERT INTO `sW` VALUES (' ¢€Šš'),(' ¢€Š'),(' ¢€'),(' ¢'),(' '),('');
INSERT INTO `sX` VALUES ('\\\\\'),('\\\\'),('\\\'),('\\'),('\'),('');
INSERT INTO `sPO` VALUES ('±²³Žµ'),('±²³Ž'),('±²³'),('±²'),('±'),('');
INSERT INTO `sPP` VALUES (' ¢€Šš'),(' ¢€Š'),(' ¢€'),(' ¢'),(' '),('');
INSERT INTO `sPQ` VALUES ('\\\\\'),('\\\\'),('\\\'),('\\'),('\'),('');
#InnoDB
SELECT `bP`, LENGTH(`bP`) FROM `sP`;
SELECT `bP`, LENGTH(`bP`) FROM `sQ`;
SELECT `bP`, LENGTH(`bP`) FROM `sR`;
#MyISAM
SELECT `bP`, LENGTH(`bP`) FROM `sS`;
SELECT `bP`, LENGTH(`bP`) FROM `sT`;
SELECT `bP`, LENGTH(`bP`) FROM `sU`;
#HEAP
SELECT `bP`, LENGTH(`bP`) FROM `sV`;
SELECT `bP`, LENGTH(`bP`) FROM `sW`;
SELECT `bP`, LENGTH(`bP`) FROM `sX`;
#BDB
SELECT `bP`, LENGTH(`bP`) FROM `sPO`;
SELECT `bP`, LENGTH(`bP`) FROM `sPP`;
SELECT `bP`, LENGTH(`bP`) FROM `sPQ`;
DROP TABLE `sP`;
DROP TABLE `sQ`;
DROP TABLE `sR`;
DROP TABLE `sS`;
DROP TABLE `sT`;
DROP TABLE `sU`;
DROP TABLE `sV`;
DROP TABLE `sW`;
DROP TABLE `sX`;
DROP TABLE `sPO`;
DROP TABLE `sPP`;
DROP TABLE `sPQ`;
|