diff options
author | Monty <monty@mariadb.org> | 2018-02-02 11:08:36 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-02-02 11:08:36 +0200 |
commit | d69642deddf4f8d51f8c6807361576451334f1f9 (patch) | |
tree | 4b20cf71f484a31fabbfbd85f2173cc1fea5be05 /sql/tztime.cc | |
parent | 1e5e3d562b867ae83c3fbb003465e1596c748690 (diff) | |
download | mariadb-git-d69642deddf4f8d51f8c6807361576451334f1f9.tar.gz |
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
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index a9db91668bb..45af8f24943 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1639,7 +1639,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) my_hash_free(&tz_names); goto end; } - init_sql_alloc(&tz_storage, 32 * 1024, 0, MYF(0)); + init_sql_alloc(&tz_storage, "timezone_storage", 32 * 1024, 0, MYF(0)); mysql_mutex_init(key_tz_LOCK, &tz_LOCK, MY_MUTEX_INIT_FAST); tz_inited= 1; @@ -2565,7 +2565,8 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose) } else if (MY_S_ISREG(cur_dir->dir_entry[i].mystat->st_mode)) { - init_alloc_root(&tz_storage, 32768, 0, MYF(MY_THREAD_SPECIFIC)); + init_alloc_root(&tz_storage, "timezone_storage", 32768, 0, + MYF(MY_THREAD_SPECIFIC)); if (!tz_load(fullname, &tz_info, &tz_storage)) print_tz_as_sql(root_name_end + 1, &tz_info); else @@ -2739,7 +2740,7 @@ main(int argc, char **argv) First argument is timezonefile. The second is timezonename if opt_leap is not given */ - init_alloc_root(&tz_storage, 32768, 0, MYF(0)); + init_alloc_root(&tz_storage, "timezone_storage", 32768, 0, MYF(0)); if (tz_load(argv[0], &tz_info, &tz_storage)) { @@ -2813,7 +2814,7 @@ main(int argc, char **argv) MY_INIT(argv[0]); - init_alloc_root(&tz_storage, 32768, MYF(0)); + init_alloc_root(&tz_storage, "timezone_storage", 32768, MYF(0)); /* let us set some well known timezone */ setenv("TZ", "MET", 1); |