summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-01 22:13:01 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-01 22:13:01 +0300
commite8a9191e646ab510e14082793fed2d828e6c8679 (patch)
tree69c3769c2ef77ec6e6b011a08486f8253e54006f /sql/sql_rename.cc
parentf7ba9dafd5f92863ffd9a0b3ebee7147d73bbb21 (diff)
downloadmariadb-git-e8a9191e646ab510e14082793fed2d828e6c8679.tar.gz
Backport of:
------------------------------------------------------------ revno: 2630.9.3 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w3 timestamp: Wed 2008-06-11 08:33:36 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Changed close_cached_tables() not to flush all unused TABLE instances when flushing individual table. Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal, rewrote its code to be more efficient. ****** Backport of: ------------------------------------------------------------ revno: 2630.9.4 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w3 timestamp: Wed 2008-06-11 15:53:53 +0400 message: WL#3726 "DDL locking for all metadata objects". After-review fixes in progress. Minor changes in order to improve code readability and simplify debugging. mysql-test/r/ps_ddl.result: Restore the original (correct) behaviour, now that the patch that fixes the regression introduced by the original patch for WL#3726 is fixed. mysql-test/t/ps_ddl.test: Restore the original (correct) behaviour, now that the patch that fixes the regression introduced by the original patch for WL#3726 is fixed sql/mysql_priv.h: Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal. sql/sql_base.cc: Changed close_cached_tables() not to flush all unused TABLE instances when flushing individual table. Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal, rewrote its code to be more efficient. As result removed relink_unused() function which is no longer used. ****** Improved code in close_cached_tables() according to reviewer's comments. sql/sql_delete.cc: Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal. sql/sql_rename.cc: Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal. sql/sql_show.cc: Moved acquisition of high-prio shared metadata lock in which happens in fill_schema_table_from_frm() to separate function. sql/sql_table.cc: Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal. sql/sql_trigger.cc: Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal.
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r--sql/sql_rename.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index fdf2f5ac155..ca1543b32d8 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -139,7 +139,8 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
pthread_mutex_lock(&LOCK_open);
for (ren_table= table_list; ren_table; ren_table= ren_table->next_local)
- expel_table_from_cache(0, ren_table->db, ren_table->table_name);
+ tdc_remove_table(thd, TDC_RT_REMOVE_ALL, ren_table->db,
+ ren_table->table_name);
error=0;
if ((ren_table=rename_tables(thd,table_list,0)))