diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-01 01:01:27 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-01 01:01:27 +0300 |
commit | 3d19fdad34c5fa23ac800a0b4819325ee66d8bd4 (patch) | |
tree | 66e5cfdb62943db8e5d81aa16a8740af51a470f7 /sql/table.h | |
parent | af4ee7432a83f86a0bf8c7b684ae74e0ef093bcd (diff) | |
download | mariadb-git-3d19fdad34c5fa23ac800a0b4819325ee66d8bd4.tar.gz |
Backport of:
------------------------------------------------------------
revno: 2630.4.14
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Wed 2008-05-28 12:16:03 +0400
message:
WL#3726 "DDL locking for all metadata objects".
After review fixes in progress. Removed unused code and
adjusted names of functions/methods to better reflect
their current function.
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/sql/table.h b/sql/table.h index 60560029725..a31b96e0828 100644 --- a/sql/table.h +++ b/sql/table.h @@ -793,24 +793,6 @@ public: */ my_bool key_read; my_bool no_keyread; - /* - Placeholder for an open table which prevents other connections - from taking name-locks on this table. Typically used with - TABLE_SHARE::version member to take an exclusive name-lock on - this table name -- a name lock that not only prevents other - threads from opening the table, but also blocks other name - locks. This is achieved by: - - setting open_placeholder to 1 - this will block other name - locks, as wait_for_locked_table_name will be forced to wait, - see table_is_used for details. - - setting version to 0 - this will force other threads to close - the instance of this table and wait (this is the same approach - as used for usual name locks). - An exclusively name-locked table currently can have no handler - object associated with it (db_stat is always 0), but please do - not rely on that. - */ - my_bool open_placeholder; my_bool locked_by_logger; my_bool no_replicate; my_bool locked_by_name; @@ -874,12 +856,10 @@ public: read_set= &def_read_set; write_set= &def_write_set; } - /* Is table open or should be treated as such by name-locking? */ - inline bool is_name_opened() { return db_stat || open_placeholder; } /* - Is this instance of the table should be reopen or represents a name-lock? + Is this instance of the table should be reopen? */ - inline bool needs_reopen_or_name_lock() + inline bool needs_reopen() { return s->version != refresh_version; } bool is_children_attached(void); }; |