summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-02-14 16:28:05 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-10 19:24:22 +0100
commit05779bc6f1a585156c572fbcd89c78b3b1f51f5d (patch)
tree9ac80b8694aa9f21633f705cee7f08f7145c1e5d /sql/sql_admin.cc
parent22b6d8487aa08123c30092c1f1df48e31c79eff3 (diff)
downloadmariadb-git-05779bc6f1a585156c572fbcd89c78b3b1f51f5d.tar.gz
perfschema mdl related instrumentation changes
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index e5347f2fda4..3982f453bd2 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -122,9 +122,9 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
Let us try to open at least a .FRM for this table.
*/
- 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);
if (lock_table_names(thd, table_list, table_list->next_global,
thd->variables.lock_wait_timeout, 0))
@@ -547,8 +547,9 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
close_thread_tables(thd);
table->table= NULL;
thd->mdl_context.release_transactional_locks();
- table->mdl_request.init(MDL_key::TABLE, table->db.str, table->table_name.str,
- MDL_SHARED_NO_READ_WRITE, MDL_TRANSACTION);
+ MDL_REQUEST_INIT(&table->mdl_request, MDL_key::TABLE, table->db.str,
+ table->table_name.str, MDL_SHARED_NO_READ_WRITE,
+ MDL_TRANSACTION);
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
@@ -822,8 +823,9 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
close_thread_tables(thd);
table->table= NULL;
thd->mdl_context.release_transactional_locks();
- table->mdl_request.init(MDL_key::TABLE, table->db.str, table->table_name.str,
- MDL_SHARED_NO_READ_WRITE, MDL_TRANSACTION);
+ MDL_REQUEST_INIT(&table->mdl_request, MDL_key::TABLE, table->db.str,
+ table->table_name.str, MDL_SHARED_NO_READ_WRITE,
+ MDL_TRANSACTION);
table->mdl_request.set_type(MDL_SHARED_READ);
table->lock_type= TL_READ;