summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
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/mysql_priv.h
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/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 2d043d44afa..b650af8017d 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1543,8 +1543,11 @@ char *generate_partition_syntax(partition_info *part_info,
#endif
bool notify_thread_having_shared_lock(THD *thd, THD *in_use);
-void expel_table_from_cache(THD *leave_thd, const char *db,
- const char *table_name);
+
+enum enum_tdc_remove_table_type {TDC_RT_REMOVE_ALL, TDC_RT_REMOVE_NOT_OWN,
+ TDC_RT_REMOVE_UNUSED};
+void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
+ const char *db, const char *table_name);
#define NORMAL_PART_NAME 0
#define TEMP_PART_NAME 1