diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-01 00:44:05 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-01 00:44:05 +0300 |
commit | b58e79566c5c5899c4d54a4b36ed4e876fa197ca (patch) | |
tree | 1ddec29ac5054654a2ac19a56830d104f8cb37d8 /sql/mysql_priv.h | |
parent | cd055f0efe330ace1d4d83536f1cbbeb1c8e0ab9 (diff) | |
download | mariadb-git-b58e79566c5c5899c4d54a4b36ed4e876fa197ca.tar.gz |
Backport of:
------------------------------------------------------------
revno: 2630.4.13
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Wed 2008-05-28 12:07:30 +0400
message:
WL#3726 "DDL locking for all metadata objects".
After review fixes in progress.
Get rid of remove_table_from_cache() function since it was
doing two things at once -- waiting while no one uses particular
table (now job of metadata locking) and removing TABLE/TABLE_SHARE
instances from table definition cache (now job of
expel_table_from_cache()).
sql/mysql_priv.h:
Got rid of remove_table_from_cache() function. Now one
should use exclusive metadata lock for waiting until all
other connections will stop using particular table and
use expel_table_from_cache() for removing table instances
and table share from table definition cache.
Removed unused mysql_wait_completed_table() function.
sql/sql_base.cc:
Got rid of remove_table_from_cache() function. Now one
should use exclusive metadata lock for waiting until all
other connections will stop using particular table and
use expel_table_from_cache() for removing table instances
and table share from table definition cache.
Removed unused mysql_wait_completed_table() function.
sql/sql_table.cc:
Get rid of two last places where we use remove_table_from_cache()
by using wait_while_table_is_used() (which uses metadata locks)
and close_cached_tables() instead.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 063b36c4ddc..e96534bad15 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1542,13 +1542,6 @@ char *generate_partition_syntax(partition_info *part_info, Alter_info *alter_info); #endif -/* bits for last argument to remove_table_from_cache() */ -#define RTFC_NO_FLAG 0x0000 -#define RTFC_OWNED_BY_THD_FLAG 0x0001 -#define RTFC_WAIT_OTHER_THREAD_FLAG 0x0002 -#define RTFC_CHECK_KILLED_FLAG 0x0004 -bool remove_table_from_cache(THD *thd, const char *db, const char *table, - uint flags); 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); @@ -1670,7 +1663,6 @@ extern pthread_mutex_t LOCK_gdl; bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags); int abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt); void close_open_tables_and_downgrade(ALTER_PARTITION_PARAM_TYPE *lpt); -void mysql_wait_completed_table(ALTER_PARTITION_PARAM_TYPE *lpt, TABLE *my_table); /* Functions to work with system tables. */ bool open_system_tables_for_read(THD *thd, TABLE_LIST *table_list, |