From ffed2b74789ca1ca4f56a13a6ae8d80e4bd6a6a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jan 2004 15:16:48 +0100 Subject: Mark that strings may change on index only reads (for BDB tables). This fixed problem with index reads on character fields with BDB tables. (Bug #2509) BitKeeper/etc/ignore: added man/*.1 mysql-test/r/bdb.result: New test mysql-test/r/myisam.result: More tests mysql-test/t/bdb.test: Test for idnex only read mysql-test/t/myisam.test: More test to verify pushed bug fix sql/ha_berkeley.h: Mark that strings may change on index only reads sql/item_strfunc.cc: Cleanup sql/table.cc: Allow index only reads on binary strings --- mysql-test/t/myisam.test | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/myisam.test') diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 394261aae40..7302e5dfdda 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -390,9 +390,13 @@ drop table t1; # two bugs in myisam-space-stripping feature # create table t1 ( a text not null, key a (a(20))); -insert into t1 values ('aaa '),('aaa'); +insert into t1 values ('aaa '),('aaa'),('aa'); +check table t1; repair table t1; select concat(a,'.') from t1 where a='aaa'; +select concat(a,'.') from t1 where binary a='aaa'; +update t1 set a='bbb' where a='aaa'; +select concat(a,'.') from t1; drop table t1; # @@ -406,3 +410,15 @@ insert into t1 values('807780', '472', '162'); select * from t1 where a='807780' and b='477' and c='165'; drop table t1; +# +# Test text and unique +# +create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))); +insert into t1 (b) values ('a'),('a '),('a '); +select concat(b,'.') from t1; +update t1 set b='b ' where a=2; +--error 1062 +update t1 set b='b ' where a > 1; +delete from t1 where b='b'; +select a,concat(b,'.') from t1; +drop table t1; -- cgit v1.2.1