summaryrefslogtreecommitdiff
path: root/mysql-test/suite/heap/heap.test
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-08 18:04:57 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-08 18:04:57 +0300
commit1aa6f042dab7a09dd86d96f934faa87df1c005c1 (patch)
treeb08341531df7b3966ef814a5b66c7661ae01efb3 /mysql-test/suite/heap/heap.test
parentf2d7609ac0c1af1065400f6a6c8b5295c184f381 (diff)
downloadmariadb-git-1aa6f042dab7a09dd86d96f934faa87df1c005c1.tar.gz
Better test case for MDEV-436
Diffstat (limited to 'mysql-test/suite/heap/heap.test')
-rw-r--r--mysql-test/suite/heap/heap.test25
1 files changed, 23 insertions, 2 deletions
diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test
index 062b48f2c31..681d3b422e7 100644
--- a/mysql-test/suite/heap/heap.test
+++ b/mysql-test/suite/heap/heap.test
@@ -489,7 +489,7 @@ DROP TABLE t1;
#
# Show that MIN_ROWS and MAX_ROWS have an effect on how data_length
# and index_length are allocated.
-# This is different for 32 and 64 bit machines as pointer lengths are different
+# Result is different for 32 / 64 bit machines as pointer lengths are different
#
CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=100;
@@ -504,7 +504,28 @@ CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=3000 max_rows=3000;
insert into t1 values(1);
select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
drop table t1;
-CREATE TABLE t1 (a int, index(a)) engine=heap max_rows=4000;
+CREATE TABLE t1 (a int, index(a)) engine=heap max_rows=15000;
insert into t1 values(1);
select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
drop table t1;
+
+create table t1 (c1 int, index(c1)) engine=heap max_rows=10000;
+insert into t1 select rand(100000000);
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1;
+insert into t1 select rand(100000000) from t1 limit 488;
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+insert into t1 select rand(100000000) from t1 limit 1;
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+insert into t1 select rand(100000000) from t1 limit 1000;
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+insert into t1 select rand(100000000) from t1;
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+drop table t1;