1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Backport of:

----------------------------------------------------------
revno: 2617.23.20
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Wed 2009-03-04 16:31:31 +0300
message:
  WL#4284 "Transactional DDL locking"
  Review comments: "Objectify" the MDL API.
  MDL_request and MDL_context still need manual construction and
  destruction, since they are used in environment that is averse
  to constructors/destructors.


sql/mdl.cc:
  Improve comments.
  Add asserts to backup()/restore_from_backup()/merge() methods.
  Fix an order bug in the error path of mdl_acquire_exclusive_locks():
  we used to first free a ticket object, and only then exclude
  it from the list of tickets.
This commit is contained in:
Konstantin Osipov
2009-12-04 02:52:05 +03:00
parent 97abce0e7c
commit a9013f8fba
20 changed files with 829 additions and 797 deletions

View File

@@ -5977,9 +5977,9 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ptr->next_name_resolution_table= NULL;
/* Link table in global list (all used tables) */
lex->add_to_query_tables(ptr);
ptr->mdl_lock_request=
mdl_request_alloc(0, ptr->db, ptr->table_name, thd->locked_tables_root ?
thd->locked_tables_root : thd->mem_root);
ptr->mdl_request=
MDL_request::create(0, ptr->db, ptr->table_name, thd->locked_tables_root ?
thd->locked_tables_root : thd->mem_root);
DBUG_RETURN(ptr);
}