summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-02-02 11:08:36 +0200
committerMonty <monty@mariadb.org>2018-02-02 11:08:36 +0200
commitd69642deddf4f8d51f8c6807361576451334f1f9 (patch)
tree4b20cf71f484a31fabbfbd85f2173cc1fea5be05 /sql-common
parent1e5e3d562b867ae83c3fbb003465e1596c748690 (diff)
downloadmariadb-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-common')
-rw-r--r--sql-common/client.c4
-rw-r--r--sql-common/client_plugin.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 163589a3978..b7a23e722f4 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -740,7 +740,7 @@ void free_old_query(MYSQL *mysql)
if (mysql->fields)
free_root(&mysql->field_alloc,MYF(0));
/* Assume rowlength < 8192 */
- init_alloc_root(&mysql->field_alloc, 8192, 0,
+ init_alloc_root(&mysql->field_alloc, "fields", 8192, 0,
MYF(mysql->options.use_thread_specific_memory ?
MY_THREAD_SPECIFIC : 0));
mysql->fields= 0;
@@ -1464,7 +1464,7 @@ MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
DBUG_RETURN(0);
}
/* Assume rowlength < 8192 */
- init_alloc_root(&result->alloc, 8192, 0,
+ init_alloc_root(&result->alloc, "result", 8192, 0,
MYF(mysql->options.use_thread_specific_memory ?
MY_THREAD_SPECIFIC : 0));
result->alloc.min_malloc=sizeof(MYSQL_ROWS);
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c
index f93e50125c5..f81660f8986 100644
--- a/sql-common/client_plugin.c
+++ b/sql-common/client_plugin.c
@@ -251,7 +251,7 @@ int mysql_client_plugin_init()
bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
mysql_mutex_init(0, &LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
- init_alloc_root(&mem_root, 128, 128, MYF(0));
+ init_alloc_root(&mem_root, "client_plugin", 128, 128, MYF(0));
bzero(&plugin_list, sizeof(plugin_list));