summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_cp1251.result16
-rw-r--r--mysql-test/t/ctype_cp1251.test14
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 3793e962d40..647f8c6236c 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -54,3 +54,19 @@ select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;
collation(a) collation(b) collation(binary 'ccc')
cp1251_bin binary binary
drop table t1;
+create table t1 (
+a varchar(16) character set cp1251 collate cp1251_bin not null,
+b int(10) default null,
+primary key(a)
+) charset=cp1251;
+insert into t1 (a) values ('air'),
+('we'),('g'),('we_toshko'), ('s0urce'),('we_ivo'),('we_iliyan'),
+('we_martin'),('vw_grado'),('vw_vasko'),('tn_vili'),('tn_kalina'),
+('tn_fakira'),('vw_silvia'),('vw_starshi'),('vw_geo'),('vw_b0x1');
+select * from t1 where a like 'we_%';
+a b
+we_iliyan NULL
+we_ivo NULL
+we_martin NULL
+we_toshko NULL
+drop table t1;
diff --git a/mysql-test/t/ctype_cp1251.test b/mysql-test/t/ctype_cp1251.test
index 66a8a5aa909..2d670ec3607 100644
--- a/mysql-test/t/ctype_cp1251.test
+++ b/mysql-test/t/ctype_cp1251.test
@@ -32,3 +32,17 @@ select * from t1 where lower(b)='bbb';
select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1;
select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;
drop table t1;
+
+# Test for BUG#8560
+create table t1 (
+ a varchar(16) character set cp1251 collate cp1251_bin not null,
+ b int(10) default null,
+ primary key(a)
+) charset=cp1251;
+insert into t1 (a) values ('air'),
+ ('we'),('g'),('we_toshko'), ('s0urce'),('we_ivo'),('we_iliyan'),
+ ('we_martin'),('vw_grado'),('vw_vasko'),('tn_vili'),('tn_kalina'),
+ ('tn_fakira'),('vw_silvia'),('vw_starshi'),('vw_geo'),('vw_b0x1');
+
+select * from t1 where a like 'we_%';
+drop table t1;