summaryrefslogtreecommitdiff
path: root/mysql-test/t/show_check.test
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-02-20 00:33:16 +0400
committerunknown <vva@eagle.mysql.r18.ru>2004-02-20 00:33:16 +0400
commit5367d17cd4cb2d9235099d9b8a603ee5361ea54e (patch)
treee41acd79f185b6c97daf918fc209e42d084943be /mysql-test/t/show_check.test
parent4443e76696dff869b22a5705bd9dcbae66d09458 (diff)
downloadmariadb-git-5367d17cd4cb2d9235099d9b8a603ee5361ea54e.tar.gz
fixed for BUG #2719 "Heap tables status shows wrong or missing data"
heap/hp_delete.c: added code for right calculation of Index_length in HEAP tables with BTREE indexes heap/hp_write.c: added code for right calculation of Index_length in HEAP tables with BTREE indexes mysql-test/r/show_check.result: added test for BUG #2719 "Heap tables status shows wrong or missing data" mysql-test/t/show_check.test: added test for BUG #2719 "Heap tables status shows wrong or missing data"
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r--mysql-test/t/show_check.test54
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 1d64cfd2105..935e472c4a1 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -182,3 +182,57 @@ SHOW CREATE TABLE `table`;
DROP TABLE `table`;
SET sql_quote_show_create=ON;
+
+#
+# Test for bug #2719 "Heap tables status shows wrong or missing data."
+#
+
+select @@max_heap_table_size;
+
+CREATE TABLE t1 (
+ a int(11) default NULL,
+ KEY a TYPE BTREE (a)
+) ENGINE=HEAP;
+
+CREATE TABLE t2 (
+ b int(11) default NULL,
+ index(b)
+) ENGINE=HEAP;
+
+CREATE TABLE t3 (
+ a int(11) default NULL,
+ b int(11) default NULL,
+ KEY a TYPE BTREE (a),
+ index(b)
+) ENGINE=HEAP;
+
+insert into t1 values (1),(2);
+insert into t2 values (1),(2);
+insert into t3 values (1,1),(2,2);
+show table status;
+insert into t1 values (3),(4);
+insert into t2 values (3),(4);
+insert into t3 values (3,3),(4,4);
+show table status;
+insert into t1 values (5);
+insert into t2 values (5);
+insert into t3 values (5,5);
+show table status;
+delete from t1 where a=3;
+delete from t2 where b=3;
+delete from t3 where a=3;
+show table status;
+delete from t1;
+delete from t2;
+delete from t3;
+show table status;
+insert into t1 values (5);
+insert into t2 values (5);
+insert into t3 values (5,5);
+show table status;
+delete from t1 where a=5;
+delete from t2 where b=5;
+delete from t3 where a=5;
+show table status;
+
+drop table t1, t2, t3;