summaryrefslogtreecommitdiff
path: root/mysql-test/t/heap.test
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-04-16 14:05:55 +0300
committerunknown <monty@donna.mysql.fi>2001-04-16 14:05:55 +0300
commite5bd740dea6d55e15acc9d89990bb6c1909db40e (patch)
tree71b8dc7684015c297db3e01616c40cfa6acc6324 /mysql-test/t/heap.test
parent4b570fc359635b216abd8852c31ac32cb35bae46 (diff)
downloadmariadb-git-e5bd740dea6d55e15acc9d89990bb6c1909db40e.tar.gz
Fixed bug with HEAP tables when using LIKE
Docs/manual.texi: Updated information about BDB tables. mysql-test/r/heap.result: Added test for HEAP bug mysql-test/t/heap.test: Added test for HEAP bug sql/field.cc: Fixed bug with HEAP tables sql/gen_lex_hash.cc: Smallare array
Diffstat (limited to 'mysql-test/t/heap.test')
-rw-r--r--mysql-test/t/heap.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test
index cd21aaff77a..abb9e1fd1bc 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/t/heap.test
@@ -2,6 +2,7 @@
# Test of heap tables.
#
+drop table if exists t1;
create table t1 (a int not null,b int not null, primary key (a)) type=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100;
insert into t1 values(1,1),(2,2),(3,3),(4,4);
delete from t1 where a=1 or a=0;
@@ -85,3 +86,17 @@ INSERT into t1 set f1=12,f2="ted";
delete from t1 where f2="bill";
select * from t1;
drop table t1;
+
+#
+# Test when using part key searches
+#
+
+create table t1 (btn char(10) not null, key(btn)) type=heap;
+insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
+explain select * from t1 where btn like "q%";
+select * from t1 where btn like "q%";
+alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn;
+update t1 set new_col=btn;
+explain select * from t1 where btn="a";
+explain select * from t1 where btn="a" and new_col="a";
+drop table t1;