summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-01-29 13:50:26 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-10 19:24:22 +0100
commit7c58e97bf6f80a251046c5b3e7bce826fe058bd6 (patch)
tree7d32d26b320cf83296ee0ede2ea164ad116c4de8 /sql/sql_db.cc
parent2ac3121af2767186c489054db5d4871d04b8eef4 (diff)
downloadmariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz
perfschema memory related instrumentation changes
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index ae7f26370fa..b4d96b83dbe 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -188,7 +188,7 @@ bool my_dboptions_cache_init(void)
dboptions_init= 1;
error= my_hash_init(&dboptions, table_alias_charset,
32, 0, 0, (my_hash_get_key) dboptions_get_key,
- free_dbopt,0);
+ free_dbopt, 0, key_memory_dboptions_hash);
}
return error;
}
@@ -220,7 +220,7 @@ void my_dbopt_cleanup(void)
my_hash_free(&dboptions);
my_hash_init(&dboptions, table_alias_charset,
32, 0, 0, (my_hash_get_key) dboptions_get_key,
- free_dbopt,0);
+ free_dbopt, 0, key_memory_dboptions_hash);
mysql_rwlock_unlock(&LOCK_dboptions);
}
@@ -290,7 +290,7 @@ static my_bool put_dbopt(const char *dbname, Schema_specification_st *create)
/* Options are not in the hash, insert them */
char *tmp_name;
char *tmp_comment= NULL;
- if (!my_multi_malloc(MYF(MY_WME | MY_ZEROFILL),
+ if (!my_multi_malloc(key_memory_dboptions_hash, MYF(MY_WME | MY_ZEROFILL),
&opt, (uint) sizeof(*opt), &tmp_name, (uint) length+1,
&tmp_comment, (uint) DATABASE_COMMENT_MAXLEN+1,
NullS))
@@ -1547,8 +1547,8 @@ uint mysql_change_db(THD *thd, const LEX_CSTRING *new_db_name,
TODO: fix check_db_name().
*/
- new_db_file_name.str= my_strndup(new_db_name->str, new_db_name->length,
- MYF(MY_WME));
+ new_db_file_name.str= my_strndup(key_memory_THD_db, new_db_name->str,
+ new_db_name->length, MYF(MY_WME));
new_db_file_name.length= new_db_name->length;
if (new_db_file_name.str == NULL)