~hartmut-php/drizzle/codestyle

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
-- source include/have_euckr.inc

#
# Tests with the euckr character set
#
--disable_warnings
drop table if exists t1;
--enable_warnings

SET @test_character_set= 'euckr';
SET @test_collation= 'euckr_korean_ci';
-- source include/ctype_common.inc

SET NAMES euckr;
SET collation_connection='euckr_korean_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
SET collation_connection='euckr_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc

#
# Bug#15377 Valid multibyte sequences are truncated on INSERT
#
SET NAMES euckr;
CREATE TABLE t1 (a text) character set euckr;
INSERT INTO t1 VALUES (0xA2E6),(0xFEF7);
SELECT hex(a) FROM t1 ORDER BY a;
DROP TABLE t1;

# End of 4.1 tests


set names euckr;
--source include/weight_string.inc
--source include/weight_string_l1.inc
--source include/weight_string_A1A1.inc

set collation_connection=euckr_bin;
--source include/weight_string.inc
--source include/weight_string_l1.inc
--source include/weight_string_A1A1.inc

#
#Bug #30315 Character sets: insertion of euckr code value 0xa141 fails
#
create table t1 (s1 varchar(5) character set euckr);
# Insert some valid characters
insert into t1 values (0xA141);
insert into t1 values (0xA15A);
insert into t1 values (0xA161);
insert into t1 values (0xA17A);
insert into t1 values (0xA181);
insert into t1 values (0xA1FE);
# Insert some invalid characters
insert into t1 values (0xA140);
insert into t1 values (0xA15B);
insert into t1 values (0xA160);
insert into t1 values (0xA17B);
insert into t1 values (0xA180);
insert into t1 values (0xA1FF);
select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
drop table t1;

--echo End of 5.0 tests