File: ctype_cp1250_ch.test

package info (click to toggle)
mysql-5.5 5.5.60-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 201,012 kB
  • sloc: cpp: 648,063; ansic: 552,041; perl: 48,017; pascal: 25,099; sh: 15,065; yacc: 13,088; cs: 4,647; xml: 4,178; sql: 3,380; makefile: 1,368; lex: 639; awk: 54
file content (84 lines) | stat: -rw-r--r-- 2,206 bytes parent folder | download | duplicates (4)
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
82
83
84
-- source include/have_cp1250_ch.inc
--disable_warnings
drop table if exists t1;
--enable_warnings

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

SHOW COLLATION LIKE 'cp1250_czech_cs';

SET @test_character_set= 'cp1250';
SET @test_collation= 'cp1250_general_ci';
-- source include/ctype_common.inc

SET @test_character_set= 'cp1250';
SET @test_collation= 'cp1250_czech_cs';
-- source include/ctype_common.inc



#
# Bugs: #8840: Empty string comparison and character set 'cp1250'
#

CREATE TABLE t1 (a char(16)) character set cp1250 collate cp1250_czech_cs;
INSERT INTO t1 VALUES ('');
SELECT a, length(a), a='', a=' ', a='  ' FROM t1;
DROP TABLE t1;

#
# Bug#9759 Empty result with 'LIKE' and cp1250_czech_cs
#
CREATE TABLE t1 (
  popisek varchar(30) collate cp1250_general_ci NOT NULL default '',
 PRIMARY KEY  (`popisek`)
);
INSERT INTO t1 VALUES ('2005-01-1');
SELECT * FROM t1 WHERE popisek = '2005-01-1';
SELECT * FROM t1 WHERE popisek LIKE '2005-01-1';
drop table t1;

#
# Bug#13347: empty result from query with like and cp1250 charset
#
set names cp1250;
CREATE TABLE t1
(
 id  INT AUTO_INCREMENT PRIMARY KEY,
 str VARCHAR(32)  CHARACTER SET cp1250 COLLATE cp1250_czech_cs NOT NULL default '',
 UNIQUE KEY (str)
);
			
INSERT INTO t1 VALUES (NULL, 'a');
INSERT INTO t1 VALUES (NULL, 'aa');
INSERT INTO t1 VALUES (NULL, 'aaa');
INSERT INTO t1 VALUES (NULL, 'aaaa');
INSERT INTO t1 VALUES (NULL, 'aaaaa');
INSERT INTO t1 VALUES (NULL, 'aaaaaa');
INSERT INTO t1 VALUES (NULL, 'aaaaaaa');
select * from t1 where str like 'aa%';
drop table t1;

#
# Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
#
set names cp1250;
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
insert into t1 values("abcdefgh");
insert into t1 values("");
select a from t1 where a like "abcdefgh";
drop table t1;

# End of 4.1 tests

#
# Bug #48053 String::c_ptr has a race and/or does an invalid 
#            memory reference
#            (triggered by Valgrind tests)
#  (see also ctype_eucjpms.test, ctype_cp1250.test, ctype_cp1251.test)
#
--error 1649
set global LC_MESSAGES=convert((@@global.log_bin_trust_function_creators) 
    using cp1250);