From 56ca80efae6fc95356a5aa59d8202cabc55f9aed Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Feb 2003 09:17:47 +0100 Subject: [PATCH] bug tests added --- mysql-test/r/binary.result | 19 +++++++++++++++++-- mysql-test/t/binary.test | 11 +++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index 325accf00e7..4d5eb62cc71 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -43,14 +43,29 @@ name select name from t2 where name between 'Ä' and 'Ö'; name drop table t1,t2; -create table t1 (a char(10) not null, b char(10) binary not null,index (a)); +create table t1 (a char(10) not null, b char(10) binary not null,key (a), key(b)); insert into t1 values ("hello ","hello "),("hello2 ","hello2 "); +select * from t1 where a="hello"; +a b +hello hello select * from t1 where a="hello "; a b hello hello +select * from t1 ignore index (a) where a="hello "; +a b +hello hello +select * from t1 where b="hello"; +a b +hello hello select * from t1 where b="hello "; a b -select * from t1 where b="hello"; +hello hello +select * from t1 ignore index (b) where b="hello "; +a b +alter table t1 modify b tinytext not null, drop key b, add key (b(100)); +select * from t1 where b="hello "; +a b +select * from t1 ignore index (b) where b="hello "; a b hello hello drop table t1; diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test index fc2d91e20fe..95815cda60f 100644 --- a/mysql-test/t/binary.test +++ b/mysql-test/t/binary.test @@ -26,11 +26,18 @@ drop table t1,t2; # Test of binary and normal strings # -create table t1 (a char(10) not null, b char(10) binary not null,index (a)); +create table t1 (a char(10) not null, b char(10) binary not null,key (a), key(b)); insert into t1 values ("hello ","hello "),("hello2 ","hello2 "); +select * from t1 where a="hello"; select * from t1 where a="hello "; -select * from t1 where b="hello "; +select * from t1 ignore index (a) where a="hello "; select * from t1 where b="hello"; +select * from t1 where b="hello "; +select * from t1 ignore index (b) where b="hello "; +# blob test +alter table t1 modify b tinytext not null, drop key b, add key (b(100)); +select * from t1 where b="hello "; +select * from t1 ignore index (b) where b="hello "; drop table t1; #