diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-01 01:39:13 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-01 01:39:13 +0300 |
commit | b05303c132995ed78f38d725ffae198dcaaba364 (patch) | |
tree | 52b964eba5b9ce63717368ccff69c2934a6e8472 /sql/lock.cc | |
parent | e23046d1bcaf54838167dd6bd3d8c6900e24b2ef (diff) | |
download | mariadb-git-b05303c132995ed78f38d725ffae198dcaaba364.tar.gz |
Backport of:
------------------------------------------------------------
revno: 2630.4.18
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w2
timestamp: Tue 2008-06-03 21:07:58 +0400
message:
WL#3726 "DDL locking for all metadata objects".
After review fixes in progress.
Now during upgrading/downgrading metadata locks we deal with
individual metadata lock requests rather than with all requests
for this object in the context. This makes API a bit more clear
and makes adjust_mdl_locks_upgradability() much nicer.
sql/lock.cc:
lock_table_names():
Set TABLE_LIST::mdl_lock_data when allocating new metadata
lock request object for table list element.
sql/mdl.cc:
Now during upgrading/downgrading metadata locks we deal with
individual metadata lock requests rather than with all
requests for this object in the context. Adjusted upgrade/
downgrade functions accordingly.
We also got rid of mdl_release_exclusive_locks() and
now release locks individually. To simplify this process
mdl_release_all_locks_for_name() was introduced.
sql/mdl.h:
Now during upgrading/downgrading metadata locks we deal with
individual metadata lock requests rather than with all
requests for this object in the context. Adjusted upgrade/
downgrade functions accordingly.
We also got rid of mdl_release_exclusive_locks() and
now release locks individually. To simplify this process
mdl_release_all_locks_for_name() was introduced.
sql/sql_base.cc:
Now during upgrading/downgrading metadata locks we deal with
individual metadata lock requests rather than with all
requests for this object in the context.
We also got rid of mdl_release_exclusive_locks() and
now release locks individually.
sql/sql_parse.cc:
adjust_mdl_locks_upgradability() is much simplier now due to the
fact that now during upgrading/downgrading metadata locks we
deal with individual metadata lock requests rather than with
all requests for this object in the context.
sql/sql_table.cc:
Now during upgrading/downgrading metadata locks we deal with
individual metadata lock requests rather than with all
requests for this object in the context. Adjusted upgrade/
downgrade functions accordingly.
We also got rid of mdl_release_exclusive_locks() and
now release locks individually. To simplify this process
mdl_release_all_locks_for_name() was introduced.
sql/sql_trigger.cc:
ow during upgrading/downgrading metadata locks we deal with
individual metadata lock requests rather than with all
requests for this object in the context.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index b5eaaa05fff..f391b323a59 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -976,6 +976,7 @@ bool lock_table_names(THD *thd, TABLE_LIST *table_list) goto end; mdl_set_lock_type(mdl_lock_data, MDL_EXCLUSIVE); mdl_add_lock(&thd->mdl_context, mdl_lock_data); + lock_table->mdl_lock_data= mdl_lock_data; } if (mdl_acquire_exclusive_locks(&thd->mdl_context)) return 1; |