Backport of:

---------------------------------------------
2630.7.3 Konstantin Osipov       2008-06-02
        Various style changes preceding the removal of reopen_table().
(Post-review fixes for WL#3726).


sql/event_db_repository.cc:
  Update to use the new signature of TABLE_LIST::init_one_table().
sql/mysql_priv.h:
  Move close_cached_table() and wait_while_table_is_used()
  to sql_base.cc.
sql/sql_base.cc:
  Move close_cached_table() and wait_while_table_is_used()
  from sql_table.cc.
sql/sql_table.cc:
  Move close_cached_table() and wait_while_table_is_used()
  to sql_base.cc.
sql/table.h:
  Update the signature of TABLE_LIST::init_one_table().
This commit is contained in:
Konstantin Osipov 2009-12-01 16:27:03 +03:00
commit 1ed585adff
5 changed files with 89 additions and 86 deletions

View file

@ -554,7 +554,7 @@ Event_db_repository::open_event_table(THD *thd, enum thr_lock_type lock_type,
TABLE_LIST tables;
DBUG_ENTER("Event_db_repository::open_event_table");
tables.init_one_table("mysql", "event", lock_type);
tables.init_one_table("mysql", "event", "event", lock_type);
alloc_mdl_locks(&tables, thd->mem_root);
if (simple_open_n_lock_tables(thd, &tables))
@ -1109,7 +1109,7 @@ Event_db_repository::check_system_tables(THD *thd)
/* Check mysql.db */
tables.init_one_table("mysql", "db", TL_READ);
tables.init_one_table("mysql", "db", "db", TL_READ);
alloc_mdl_locks(&tables, thd->mem_root);
if (simple_open_n_lock_tables(thd, &tables))
@ -1127,7 +1127,7 @@ Event_db_repository::check_system_tables(THD *thd)
close_thread_tables(thd);
}
/* Check mysql.user */
tables.init_one_table("mysql", "user", TL_READ);
tables.init_one_table("mysql", "user", "user", TL_READ);
alloc_mdl_locks(&tables, thd->mem_root);
if (simple_open_n_lock_tables(thd, &tables))
@ -1148,7 +1148,7 @@ Event_db_repository::check_system_tables(THD *thd)
close_thread_tables(thd);
}
/* Check mysql.event */
tables.init_one_table("mysql", "event", TL_READ);
tables.init_one_table("mysql", "event", "event", TL_READ);
alloc_mdl_locks(&tables, thd->mem_root);
if (simple_open_n_lock_tables(thd, &tables))