summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisam.test
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-02-11 00:06:46 +0100
committermonty@mysql.com <>2004-02-11 00:06:46 +0100
commitce145789092b294a562f565671478ae2bf51d14a (patch)
tree927515d304bd661aebdb0e534418caf49d322ada /mysql-test/t/myisam.test
parent0c6a0b9a3118948efeedefd036d2994982babd08 (diff)
parentefb134f3a874befe4ab1779f597ada09f57ca191 (diff)
downloadmariadb-git-ce145789092b294a562f565671478ae2bf51d14a.tar.gz
Merge with 4.0.18
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r--mysql-test/t/myisam.test37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 85e5c7a7751..6ced608344b 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -399,6 +399,43 @@ check table t1;
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'),('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;
+
+#
+# Third bug in the same code (BUG#2295)
+#
+
+create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
+insert into t1 values('807780', '477', '165');
+insert into t1 values('807780', '477', '162');
+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;
+
+#
# Test RTREE index
#
--error 1235