summaryrefslogtreecommitdiff
path: root/mysql-test/r/heap_btree.result
diff options
context:
space:
mode:
authorsvoj@april.(none) <>2006-04-19 15:13:50 +0500
committersvoj@april.(none) <>2006-04-19 15:13:50 +0500
commit06ce215f103cf83aee63a9e24340e15ee8ca1ee8 (patch)
tree5bb95b29ccad280aca995617952fa4dd8c747dc3 /mysql-test/r/heap_btree.result
parentda6210ee61ed204d1b327081d5258f13eec5072d (diff)
downloadmariadb-git-06ce215f103cf83aee63a9e24340e15ee8ca1ee8.tar.gz
BUG#18160 - Memory-/HEAP Table endless growing indexes
Updating data in HEAP table with BTREE index results in wrong index_length counter value, which keeps growing after each update. When inserting new record into tree counter is incremented by: sizeof(TREE_ELEMENT) + key_size + tree->size_of_element But when deleting element from tree it doesn't decrement counter by key_size: sizeof(TREE_ELEMENT) + tree->size_of_element This fix makes accurate allocated memory counter for tree. That is decrease counter by key_size when deleting tree element.
Diffstat (limited to 'mysql-test/r/heap_btree.result')
-rw-r--r--mysql-test/r/heap_btree.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result
index 374d2c63632..b63eaf7e48c 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/r/heap_btree.result
@@ -246,3 +246,13 @@ DELETE from t1 where a < 100;
SELECT * from t1;
a
DROP TABLE t1;
+CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
+INSERT INTO t1 VALUES(0);
+SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
+INDEX_LENGTH
+21
+UPDATE t1 SET val=1;
+SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
+INDEX_LENGTH
+21
+DROP TABLE t1;