~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/t/ctype_sjis.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_sjis.inc
 
2
 
 
3
#
 
4
# Tests with the sjis character set
 
5
#
 
6
--disable_warnings
 
7
drop table if exists t1;
 
8
--enable_warnings
 
9
 
 
10
set names sjis;
 
11
 
 
12
select 'a' like 'a';
 
13
select 'A' like 'a';
 
14
select 'A' like 'a' collate sjis_bin;
 
15
 
 
16
set @sjis1= _sjis   0xa1a2a3a4a5a6a7a8a9aaabacadaeaf;
 
17
set @sjis2= _sjis 0xb0b1b2b3b4b5b6b7b8b9babbbcbdbebf;
 
18
set @sjis3= _sjis 0xc0c1c2c3c4c5c6c7c8c9cacbcccdcecf;
 
19
set @sjis4= _sjis 0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf;
 
20
 
 
21
set @utf81= CONVERT(@sjis1 USING utf8);
 
22
set @utf82= CONVERT(@sjis2 USING utf8);
 
23
set @utf83= CONVERT(@sjis3 USING utf8);
 
24
set @utf84= CONVERT(@sjis4 USING utf8);
 
25
 
 
26
select hex(@utf81);
 
27
select hex(@utf82);
 
28
select hex(@utf83);
 
29
select hex(@utf84);
 
30
 
 
31
select hex(CONVERT(@utf81 USING sjis));
 
32
select hex(CONVERT(@utf82 USING sjis));
 
33
select hex(CONVERT(@utf83 USING sjis));
 
34
select hex(CONVERT(@utf84 USING sjis));
 
35
 
 
36
#
 
37
# Allow to insert extra CP932 characters
 
38
# into a SJIS column
 
39
#
 
40
create table t1 (a char(10) character set sjis);
 
41
insert into t1 values (0x878A);
 
42
select hex(a) from t1;
 
43
drop table t1;
 
44
 
 
45
#
 
46
# Bug #6206 ENUMs are not case sensitive even if declared BINARY
 
47
#
 
48
create table t1(c enum(0x9353,0x9373) character set sjis);
 
49
show create table t1;
 
50
insert into t1 values (0x9353);
 
51
insert into t1 values (0x9373);
 
52
select hex(c) from t1;
 
53
drop table t1;
 
54
 
 
55
#
 
56
# Bug #6223 Japanese half-width kana characters get truncated
 
57
#
 
58
SET NAMES sjis;
 
59
CREATE TABLE t1 (
 
60
 c char(16) default NULL
 
61
) ENGINE=MyISAM DEFAULT CHARSET=sjis;
 
62
insert into t1 values(0xb1),(0xb2),(0xb3);
 
63
select hex(c) from t1;
 
64
drop table t1;
 
65
 
 
66
 
 
67
SET collation_connection='sjis_japanese_ci';
 
68
-- source include/ctype_filesort.inc
 
69
-- source include/ctype_innodb_like.inc
 
70
-- source include/ctype_like_escape.inc
 
71
-- source include/ctype_like_range_f1f2.inc
 
72
SET collation_connection='sjis_bin';
 
73
-- source include/ctype_filesort.inc
 
74
-- source include/ctype_innodb_like.inc
 
75
-- source include/ctype_like_escape.inc
 
76
-- source include/ctype_like_range_f1f2.inc
 
77
 
 
78
# Check parsing of string literals in SJIS with multibyte characters that
 
79
# have an embedded \ in them. (Bug #8303)
 
80
 
 
81
--character_set sjis
 
82
SET NAMES sjis;
 
83
SELECT HEX('�����@�\') FROM DUAL;
 
84
 
 
85
# End of 4.1 tests
 
86
 
 
87
 
 
88
set names sjis;
 
89
--source include/weight_string.inc
 
90
--source include/weight_string_l1.inc
 
91
--source include/weight_string_8140.inc
 
92
 
 
93
 
 
94
set collation_connection=sjis_bin;
 
95
--source include/weight_string.inc
 
96
--source include/weight_string_l1.inc
 
97
--source include/weight_string_8140.inc