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 --- sql/table_cache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/table_cache.cc') diff --git a/sql/table_cache.cc b/sql/table_cache.cc index be990543757..393fe931a82 100644 --- a/sql/table_cache.cc +++ b/sql/table_cache.cc @@ -1284,7 +1284,8 @@ int tdc_iterate(THD *thd, my_hash_walk_action action, void *argument, if (no_dups) { - init_alloc_root(&no_dups_argument.root, 4096, 4096, MYF(alloc_flags)); + init_alloc_root(&no_dups_argument.root, "no_dups", 4096, 4096, + MYF(alloc_flags)); my_hash_init(&no_dups_argument.hash, &my_charset_bin, tdc_records(), 0, 0, eliminate_duplicates_get_key, 0, hash_flags); no_dups_argument.action= action; -- cgit v1.2.1