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 /client | |
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 'client')
-rw-r--r-- | client/completion_hash.cc | 2 | ||||
-rw-r--r-- | client/mysql.cc | 2 | ||||
-rw-r--r-- | client/mysqldump.c | 2 | ||||
-rw-r--r-- | client/mysqltest.cc | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/client/completion_hash.cc b/client/completion_hash.cc index c170b69de2d..be89dd41441 100644 --- a/client/completion_hash.cc +++ b/client/completion_hash.cc @@ -49,7 +49,7 @@ int completion_hash_init(HashTable *ht, uint nSize) ht->initialized = 0; return FAILURE; } - init_alloc_root(&ht->mem_root, 8192, 0, MYF(0)); + init_alloc_root(&ht->mem_root, "completion_hash", 8192, 0, MYF(0)); ht->pHashFunction = hashpjw; ht->nTableSize = nSize; ht->initialized = 1; diff --git a/client/mysql.cc b/client/mysql.cc index 2efa46a571d..929fba73ab5 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1207,7 +1207,7 @@ int main(int argc,char *argv[]) } glob_buffer.realloc(512); completion_hash_init(&ht, 128); - init_alloc_root(&hash_mem_root, 16384, 0, MYF(0)); + init_alloc_root(&hash_mem_root, "hash", 16384, 0, MYF(0)); if (sql_connect(current_host,current_db,current_user,opt_password, opt_silent)) { diff --git a/client/mysqldump.c b/client/mysqldump.c index 57d087b331b..9087cdcdccd 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -4938,7 +4938,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables) if (init_dumping(db, init_dumping_tables)) DBUG_RETURN(1); - init_alloc_root(&glob_root, 8192, 0, MYF(0)); + init_alloc_root(&glob_root, "glob_root", 8192, 0, MYF(0)); if (!(dump_tables= pos= (char**) alloc_root(&glob_root, tables * sizeof(char *)))) die(EX_EOM, "alloc_root failure."); diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 6fcd44580a4..da959f48652 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -9117,7 +9117,7 @@ int main(int argc, char **argv) #endif init_dynamic_string(&ds_res, "", 2048, 2048); - init_alloc_root(&require_file_root, 1024, 1024, MYF(0)); + init_alloc_root(&require_file_root, "require_file", 1024, 1024, MYF(0)); parse_args(argc, argv); |