diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2020-03-11 12:07:06 +0100 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2020-03-11 12:07:06 +0100 |
commit | 19ef6bb73823bb213591deb7dff1b211fa59920e (patch) | |
tree | f59cc56ffd57ca7aa3694e5160e752d7bde90706 /sql/sql_db.cc | |
parent | e9765e6d594d98ae52acf0c1278857cc6c7061cc (diff) | |
parent | 9d7ed94f6a526748eff29dae2939a3fd341f118b (diff) | |
download | mariadb-git-bb-10.5-MDEV-13362.tar.gz |
Merge branch '10.5' of https://github.com/MariaDB/server into bb-10.5-MDEV-13362bb-10.5-MDEV-13362
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index ae7f26370fa..3ad7bea5661 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -186,9 +186,9 @@ bool my_dboptions_cache_init(void) if (!dboptions_init) { dboptions_init= 1; - error= my_hash_init(&dboptions, table_alias_charset, - 32, 0, 0, (my_hash_get_key) dboptions_get_key, - free_dbopt,0); + error= my_hash_init(key_memory_dboptions_hash, &dboptions, + table_alias_charset, 32, 0, 0, (my_hash_get_key) + dboptions_get_key, free_dbopt, 0); } return error; } @@ -218,9 +218,8 @@ void my_dbopt_cleanup(void) { mysql_rwlock_wrlock(&LOCK_dboptions); my_hash_free(&dboptions); - my_hash_init(&dboptions, table_alias_charset, - 32, 0, 0, (my_hash_get_key) dboptions_get_key, - free_dbopt,0); + my_hash_init(key_memory_dboptions_hash, &dboptions, table_alias_charset, 32, + 0, 0, (my_hash_get_key) dboptions_get_key, free_dbopt, 0); mysql_rwlock_unlock(&LOCK_dboptions); } @@ -290,7 +289,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)) @@ -1148,9 +1147,9 @@ static bool find_db_tables_and_rm_known_files(THD *thd, MY_DIR *dirp, (char*) table_list->table_name.str); table_list->alias= table_list->table_name; // If lower_case_table_names=2 - table_list->mdl_request.init(MDL_key::TABLE, table_list->db.str, - table_list->table_name.str, MDL_EXCLUSIVE, - MDL_TRANSACTION); + MDL_REQUEST_INIT(&table_list->mdl_request, MDL_key::TABLE, + table_list->db.str, table_list->table_name.str, + MDL_EXCLUSIVE, MDL_TRANSACTION); /* Link into list */ (*tot_list_next_local)= table_list; (*tot_list_next_global)= table_list; @@ -1547,8 +1546,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) |