diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-10-31 10:12:38 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-10-31 10:12:56 +0530 |
commit | 910841d188463ab2b4ceede76f803774d187ec34 (patch) | |
tree | e2fbc6d8a54331bf67c45726e11487fab4270fe3 | |
parent | 4f88a83c81400d7a015756305ef637f8f0977ec9 (diff) | |
download | mariadb-git-910841d188463ab2b4ceede76f803774d187ec34.tar.gz |
MDEV-16678 Use MDL for innodb background threads instead of dict_operation_lock
- Remove mdl for fts_optimize_table_bk() in fts_optimize_thread.
-rw-r--r-- | storage/innobase/fts/fts0opt.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index c9236ec1a76..0d347fefba9 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -2370,17 +2370,14 @@ fts_optimize_reset_start_time( /** Run OPTIMIZE on the given table by a background thread. @param[in] slot table to optimize -@param[in] fts_op_thread fts optimize thread @return DB_SUCCESS if all OK */ static MY_ATTRIBUTE((nonnull)) dberr_t fts_optimize_table_bk( - fts_slot_t* slot, - THD* fts_opt_thread) + fts_slot_t* slot) { const time_t now = time(NULL); const ulint interval = ulint(now - slot->last_run); - MDL_ticket* mdl = NULL; /* Avoid optimizing tables that were optimized recently. */ if (slot->last_run > 0 @@ -2391,8 +2388,7 @@ fts_optimize_table_bk( } dict_table_t* table = dict_table_open_on_id( - slot->table_id, false, DICT_TABLE_OP_NORMAL, - fts_opt_thread, &mdl); + slot->table_id, false, DICT_TABLE_OP_NORMAL); if (!table) { slot->last_run = now; @@ -2418,8 +2414,7 @@ fts_optimize_table_bk( error = DB_SUCCESS; } - dict_table_close(table, false, false, fts_opt_thread, mdl); - + dict_table_close(table, false, false); return(error); } /*********************************************************************//** @@ -2806,8 +2801,7 @@ DECLARE_THREAD(fts_optimize_thread)( /* Handle the case of empty slots. */ if (slot->table_id) { slot->running = true; - fts_optimize_table_bk( - slot, fts_opt_thread); + fts_optimize_table_bk(slot); } /* Wrap around the counter. */ |