diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-08 12:57:07 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-08 12:57:07 +0300 |
commit | a66a2608ae4d70a3f9b3d41e38cfb97eb616bed3 (patch) | |
tree | b2b94a32418f0728974d2bad4d3fa70acc2d75ef /sql/tztime.cc | |
parent | 4a8a1c568d8785dc608cc111e74e1ed389f1353e (diff) | |
download | mariadb-git-a66a2608ae4d70a3f9b3d41e38cfb97eb616bed3.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2617.69.20
committer: Konstantin Osipov <kostja@sun.com>
branch nick: 5.4-4284-1-assert
timestamp: Thu 2009-08-13 18:29:55 +0400
message:
WL#4284 "Transactional DDL locking"
A review fix.
Since WL#4284 implementation separated MDL_request and MDL_ticket,
MDL_request becamse a utility object necessary only to get a ticket.
Store it by-value in TABLE_LIST with the intent to merge
MDL_request::key with table_list->table_name and table_list->db
in future.
Change the MDL subsystem to not require MDL_requests to
stay around till close_thread_tables().
Remove the list of requests from the MDL context.
Requests for shared metadata locks acquired in open_tables()
are only used as a list in recover_from_failed_open_table_attempt(),
which calls mdl_context.wait_for_locks() for this list.
To keep such list for recover_from_failed_open_table_attempt(),
introduce a context class (Open_table_context), that collects
all requests.
A lot of minor cleanups and simplications that became possible
with this change.
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index 9c49c286662..c17b37e27fb 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1637,6 +1637,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) tz_init_table_list(tz_tables+1); tz_tables[0].next_global= tz_tables[0].next_local= &tz_tables[1]; tz_tables[1].prev_global= &tz_tables[0].next_global; + init_mdl_requests(tz_tables); /* We need to open only mysql.time_zone_leap_second, but we try to @@ -2296,6 +2297,7 @@ my_tz_find(THD *thd, const String *name) Open_tables_state open_tables_state_backup; tz_init_table_list(tz_tables); + init_mdl_requests(tz_tables); if (!open_system_tables_for_read(thd, tz_tables, &open_tables_state_backup)) { |