diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2019-06-19 17:42:37 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2019-11-25 18:49:51 +0400 |
commit | 092834cd2cd90c73623c019eb030f25740843e81 (patch) | |
tree | 4ae53b062ece0b56097e5926b70ee8249bcd9945 /sql/sql_base.cc | |
parent | 0aa807d10051e1231bf3d4457db16ad8e66111aa (diff) | |
download | mariadb-git-092834cd2cd90c73623c019eb030f25740843e81.tar.gz |
Removed kill_delayed_threads_for_table()
After 7fb9d64 it is used only by ALTER/DROP SERVER, which most probably
wasn't intentional as Federated never supported delayed inserts anyway.
If delayed inserts will ever become an issue with ALTER/DROP SERVER, we
should kill them by acquiring X-lock instead.
Part of MDEV-17882 - Cleanup refresh version
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 4b0fe1eb5d1..48cc72b312b 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -450,7 +450,7 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables, for (TABLE_LIST *table= tables; table; table= table->next_local) tdc_remove_table(thd, TDC_RT_REMOVE_ALL, table->db.str, - table->table_name.str, false); + table->table_name.str); } DBUG_RETURN(false); } @@ -717,7 +717,7 @@ bool close_cached_connection_tables(THD *thd, LEX_CSTRING *connection) for (TABLE_LIST *table= argument.tables; table; table= table->next_local) res|= tdc_remove_table(thd, TDC_RT_REMOVE_UNUSED, table->db.str, - table->table_name.str, TRUE); + table->table_name.str); /* Return true if we found any open connections */ DBUG_RETURN(res); @@ -846,12 +846,9 @@ close_all_tables_for_name(THD *thd, TABLE_SHARE *share, prev= &table->next; } } + /* Remove the table share from the cache. */ if (skip_table == NULL) - { - /* Remove the table share from the cache. */ - tdc_remove_table(thd, TDC_RT_REMOVE_ALL, db, table_name, - FALSE); - } + tdc_remove_table(thd, TDC_RT_REMOVE_ALL, db, table_name); } @@ -1414,8 +1411,7 @@ bool wait_while_table_is_used(THD *thd, TABLE *table, DBUG_RETURN(TRUE); tdc_remove_table(thd, TDC_RT_REMOVE_NOT_OWN, - table->s->db.str, table->s->table_name.str, - FALSE); + table->s->db.str, table->s->table_name.str); /* extra() call must come only after all instances above are closed */ if (function != HA_EXTRA_NOT_USED) (void) table->file->extra(function); @@ -1456,8 +1452,7 @@ void drop_open_table(THD *thd, TABLE *table, const LEX_CSTRING *db_name, table->file->extra(HA_EXTRA_PREPARE_FOR_DROP); close_thread_table(thd, &thd->open_tables); /* Remove the table share from the table cache. */ - tdc_remove_table(thd, TDC_RT_REMOVE_ALL, db_name->str, table_name->str, - FALSE); + tdc_remove_table(thd, TDC_RT_REMOVE_ALL, db_name->str, table_name->str); /* Remove the table from the storage engine and rm the .frm. */ quick_rm_table(thd, table_type, db_name, table_name, 0); } @@ -3046,8 +3041,7 @@ static bool auto_repair_table(THD *thd, TABLE_LIST *table_list) tdc_release_share(share); /* Remove the repaired share from the table cache. */ tdc_remove_table(thd, TDC_RT_REMOVE_ALL, - table_list->db.str, table_list->table_name.str, - FALSE); + table_list->db.str, table_list->table_name.str); end_free: my_free(entry); return result; @@ -3219,7 +3213,7 @@ Open_table_context::recover_from_failed_open() break; tdc_remove_table(m_thd, TDC_RT_REMOVE_ALL, m_failed_table->db.str, - m_failed_table->table_name.str, FALSE); + m_failed_table->table_name.str); m_thd->get_stmt_da()->clear_warning_info(m_thd->query_id); m_thd->clear_error(); // Clear error message @@ -3255,7 +3249,7 @@ Open_table_context::recover_from_failed_open() break; tdc_remove_table(m_thd, TDC_RT_REMOVE_ALL, m_failed_table->db.str, - m_failed_table->table_name.str, FALSE); + m_failed_table->table_name.str); result= auto_repair_table(m_thd, m_failed_table); /* |