Commit e87f91b2 authored by Konstantin Osipov's avatar Konstantin Osipov

Remove dead code.

sql/sql_base.h:
  Remove an unused parameter.
sql/sql_servers.cc:
  Remove an unused parameter.
parent 9771f1f7
......@@ -1150,13 +1150,12 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
}
/*
/**
Close all tables which match specified connection string or
if specified string is NULL, then any table with a connection string.
*/
bool close_cached_connection_tables(THD *thd, bool if_wait_for_refresh,
LEX_STRING *connection)
bool close_cached_connection_tables(THD *thd, LEX_STRING *connection)
{
uint idx;
TABLE_LIST tmp, *tables= NULL;
......@@ -1199,15 +1198,6 @@ bool close_cached_connection_tables(THD *thd, bool if_wait_for_refresh,
if (tables)
result= close_cached_tables(thd, tables, FALSE, LONG_TIMEOUT);
if (if_wait_for_refresh)
{
mysql_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex= 0;
thd->mysys_var->current_cond= 0;
thd->proc_info=0;
mysql_mutex_unlock(&thd->mysys_var->mutex);
}
DBUG_RETURN(result);
}
......
......@@ -229,8 +229,7 @@ void close_performance_schema_table(THD *thd, Open_tables_state *backup);
bool close_cached_tables(THD *thd, TABLE_LIST *tables,
bool wait_for_refresh, ulong timeout);
bool close_cached_connection_tables(THD *thd, bool wait_for_refresh,
LEX_STRING *connect_string);
bool close_cached_connection_tables(THD *thd, LEX_STRING *connect_string);
void close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
bool remove_from_locked_tables);
OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild);
......
......@@ -628,7 +628,7 @@ int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options)
/* close the servers table before we call closed_cached_connection_tables */
close_mysql_tables(thd);
if (close_cached_connection_tables(thd, TRUE, &name))
if (close_cached_connection_tables(thd, &name))
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_UNKNOWN_ERROR, "Server connection in use");
......@@ -1057,7 +1057,7 @@ int alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options)
/* close the servers table before we call closed_cached_connection_tables */
close_mysql_tables(thd);
if (close_cached_connection_tables(thd, FALSE, &name))
if (close_cached_connection_tables(thd, &name))
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_UNKNOWN_ERROR, "Server connection in use");
......
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