From d69642deddf4f8d51f8c6807361576451334f1f9 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 2 Feb 2018 11:08:36 +0200 Subject: Added name to MEM_ROOT for esier debugging This will make it easier to how memory allocation is done when debugging with either DBUG or gdb. Will especially help when debugging stored procedures Main change is a name argument as second argument to init_alloc_root() init_sql_alloc() Other things: - Added DBUG_ENTER/EXIT to some Virtual_tmp_table functions --- mysys/tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysys/tree.c') diff --git a/mysys/tree.c b/mysys/tree.c index c71925df7db..0dc57b6fffa 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -130,7 +130,8 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit, } if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE))) { - init_alloc_root(&tree->mem_root, default_alloc_size, 0, MYF(my_flags)); + init_alloc_root(&tree->mem_root, "tree", default_alloc_size, 0, + MYF(my_flags)); tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element; } DBUG_VOID_RETURN; -- cgit v1.2.1