mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
4441e34e38
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. heap/hp_delete.c: Added size of the key to tree_delete() for accurate allocated memory counter. include/my_tree.h: Added size of the key to tree_delete() for accurate allocated memory counter. myisam/myisamlog.c: Added size of the key to tree_delete() for accurate allocated memory counter. mysql-test/r/heap_btree.result: Testcase for BUG#18160. mysql-test/t/heap_btree.test: Testcase for BUG#18160. mysys/tree.c: Added size of the key to tree_delete() for accurate allocated memory counter. Note that this size is optional. If one doesn't need precise counter it is safe to pass 0 as key_size. |
||
---|---|---|
.. | ||
.cvsignore | ||
_check.c | ||
_rectest.c | ||
ChangeLog | ||
heapdef.h | ||
hp_block.c | ||
hp_clear.c | ||
hp_close.c | ||
hp_create.c | ||
hp_delete.c | ||
hp_extra.c | ||
hp_hash.c | ||
hp_info.c | ||
hp_open.c | ||
hp_panic.c | ||
hp_rename.c | ||
hp_rfirst.c | ||
hp_rkey.c | ||
hp_rlast.c | ||
hp_rnext.c | ||
hp_rprev.c | ||
hp_rrnd.c | ||
hp_rsame.c | ||
hp_scan.c | ||
hp_static.c | ||
hp_test1.c | ||
hp_test2.c | ||
hp_update.c | ||
hp_write.c | ||
make-ccc | ||
Makefile.am |