~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/t/ctype_gbk.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_gbk.inc
 
2
 
 
3
#
 
4
# Tests with the gbk character set
 
5
#
 
6
--disable_warnings
 
7
drop table if exists t1;
 
8
--enable_warnings
 
9
 
 
10
SET @test_character_set= 'gbk';
 
11
SET @test_collation= 'gbk_chinese_ci';
 
12
-- source include/ctype_common.inc
 
13
 
 
14
SET NAMES gbk;
 
15
SET collation_connection='gbk_chinese_ci';
 
16
-- source include/ctype_filesort.inc
 
17
-- source include/ctype_innodb_like.inc
 
18
-- source include/ctype_like_escape.inc
 
19
-- source include/ctype_like_range_f1f2.inc
 
20
SET collation_connection='gbk_bin';
 
21
-- source include/ctype_filesort.inc
 
22
-- source include/ctype_innodb_like.inc
 
23
-- source include/ctype_like_escape.inc
 
24
-- source include/ctype_like_range_f1f2.inc
 
25
 
 
26
#
 
27
# Bug#11987 mysql will truncate the text when
 
28
# the text contain GBK char:"0xA3A0" and "0xA1"
 
29
#
 
30
SET NAMES gbk;
 
31
CREATE TABLE t1 (a text) character set gbk;
 
32
INSERT INTO t1 VALUES (0xA3A0),(0xA1A1);
 
33
SELECT hex(a) FROM t1 ORDER BY a;
 
34
DROP TABLE t1;
 
35
 
 
36
#
 
37
# Bugs#15375: Unassigned multibyte codes are broken
 
38
# into parts when converting to Unicode.
 
39
# This query should return 0x003F0041. I.e. it should
 
40
# scan unassigned double-byte character 0xA140, convert
 
41
# it as QUESTION MARK 0x003F and then scan the next
 
42
# character, which is a single byte character 0x41.
 
43
#
 
44
select hex(convert(_gbk 0xA14041 using ucs2));
 
45
 
 
46
# End of 4.1 tests
 
47
 
 
48
#
 
49
# Bug#21620 ALTER TABLE affects other columns
 
50
#
 
51
create table t1 (c1 text not null, c2 text not null) character set gbk;
 
52
alter table t1 change c1 c1 mediumtext  character set gbk not null;
 
53
show create table t1;
 
54
drop table t1;
 
55
 
 
56
--echo End of 5.0 tests
 
57
 
 
58
 
 
59
set names gbk;
 
60
--source include/weight_string.inc
 
61
--source include/weight_string_l1.inc
 
62
--source include/weight_string_A1A1.inc
 
63
--source include/weight_string_8140.inc
 
64
--source include/weight_string_8EA1.inc
 
65
 
 
66
set collation_connection=gbk_bin;
 
67
--source include/weight_string.inc
 
68
--source include/weight_string_l1.inc
 
69
--source include/weight_string_A1A1.inc
 
70
--source include/weight_string_8140.inc
 
71
--source include/weight_string_8EA1.inc