summaryrefslogtreecommitdiff
path: root/mysql-test/suite/heap/heap.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-07 01:58:05 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-07 01:58:05 +0300
commitf2d7609ac0c1af1065400f6a6c8b5295c184f381 (patch)
tree10754ef47f721445fa6442b279a4fa38be508358 /mysql-test/suite/heap/heap.result
parenta7123f507598690ef0fce68b5d8dc58e63635024 (diff)
downloadmariadb-git-f2d7609ac0c1af1065400f6a6c8b5295c184f381.tar.gz
Use less memory when growing HEAP tables. See MDEV-436
mysql-test/suite/heap/heap.result: Added test case for MDEV-436 mysql-test/suite/heap/heap.test: Added test case for MDEV-436 storage/heap/hp_block.c: Don't allocate a set of HP_PTRS when not needed. This saves us about 1024 bytes for most allocations. storage/heap/hp_create.c: Made the initial allocation of block sizes depending on min_records and max_records.
Diffstat (limited to 'mysql-test/suite/heap/heap.result')
-rw-r--r--mysql-test/suite/heap/heap.result24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result
index f058c9f9c72..29ebf504e1a 100644
--- a/mysql-test/suite/heap/heap.result
+++ b/mysql-test/suite/heap/heap.result
@@ -738,3 +738,27 @@ SELECT c2 FROM t1;
c2
0
DROP TABLE t1;
+CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=100;
+insert into t1 values(1);
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+data_length index_length
+1600 2400
+drop table t1;
+CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=10000;
+insert into t1 values(1);
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+data_length index_length
+16000 24000
+drop table t1;
+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";
+data_length index_length
+48000 72000
+drop table t1;
+CREATE TABLE t1 (a int, index(a)) engine=heap max_rows=4000;
+insert into t1 values(1);
+select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";
+data_length index_length
+16000 24000
+drop table t1;