Commit ddaebdd2 authored by Marko Mäkelä's avatar Marko Mäkelä

dict_table_open_on_index_id(): Remove a redundant parameter

parent 1a3c77e5
......@@ -632,13 +632,8 @@ btr_scrub_get_table_and_index(
scrub_data->current_table = NULL;
}
/* argument to dict_table_open_on_index_id */
bool dict_locked = true;
/* open table based on index_id */
dict_table_t* table = dict_table_open_on_index_id(
index_id,
dict_locked);
dict_table_t* table = dict_table_open_on_index_id(index_id);
if (table != NULL) {
/* mark table as being scrubbed */
......
......@@ -3810,29 +3810,14 @@ dict_load_table_id_on_index_id(
return(found);
}
UNIV_INTERN
dict_table_t*
dict_table_open_on_index_id(
/*========================*/
index_id_t index_id, /*!< in: index id */
bool dict_locked) /*!< in: dict locked */
dict_table_t* dict_table_open_on_index_id(index_id_t index_id)
{
if (!dict_locked) {
mutex_enter(&dict_sys->mutex);
}
ut_ad(mutex_own(&dict_sys->mutex));
table_id_t table_id;
dict_table_t * table = NULL;
if (dict_load_table_id_on_index_id(index_id, &table_id)) {
bool local_dict_locked = true;
table = dict_table_open_on_id(table_id,
local_dict_locked,
table = dict_table_open_on_id(table_id, true,
DICT_TABLE_OP_LOAD_TABLESPACE);
}
if (!dict_locked) {
mutex_exit(&dict_sys->mutex);
}
return table;
}
......@@ -115,12 +115,7 @@ dict_table_open_on_id(
/**********************************************************************//**
Returns a table object based on table id.
@return table, NULL if does not exist */
UNIV_INTERN
dict_table_t*
dict_table_open_on_index_id(
/*==================*/
table_id_t table_id, /*!< in: table id */
bool dict_locked) /*!< in: TRUE=data dictionary locked */
dict_table_t* dict_table_open_on_index_id(index_id_t index_id)
__attribute__((warn_unused_result));
/********************************************************************//**
Decrements the count of open handles to a table. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment