#At file:///opt/local/work/next-4284-stage/ based on revid:dlenev@stripped
3080 Konstantin Osipov 2010-01-29
Bug#46272, review fixes.
Now that we don't self-deadlock on incompatible locks,
we no longer need to check for the global shared lock
in MDL.
Fix a merge bug in sql_view.cc when the global read lock
API was misused.
modified:
sql/mdl.cc
sql/sql_view.cc
=== modified file 'sql/mdl.cc'
--- a/sql/mdl.cc 2010-01-29 11:01:39 +0000
+++ b/sql/mdl.cc 2010-01-29 14:44:18 +0000
@@ -1147,12 +1147,6 @@ MDL_context::acquire_global_intention_ex
DBUG_ASSERT(mdl_request->key.mdl_namespace() == MDL_key::GLOBAL &&
mdl_request->type == MDL_INTENTION_EXCLUSIVE);
- if (is_lock_owner(MDL_key::GLOBAL, "", "", MDL_SHARED))
- {
- my_error(ER_CANT_UPDATE_WITH_READLOCK, MYF(0));
- return TRUE;
- }
-
/*
If this is a non-recursive attempt to acquire global intention
exclusive lock we might have to wait until active global shared
=== modified file 'sql/sql_view.cc'
--- a/sql/sql_view.cc 2010-01-25 16:47:37 +0000
+++ b/sql/sql_view.cc 2010-01-29 14:44:18 +0000
@@ -614,7 +614,7 @@ bool mysql_create_view(THD *thd, TABLE_L
#endif
- if (thd->global_read_lock.wait_if_global_read_lock(thd, FALSE, FALSE))
+ if (thd->global_read_lock.wait_if_global_read_lock(thd, FALSE, TRUE))
{
res= TRUE;
goto err;
Attachment: [text/bzr-bundle] bzr/kostja@sun.com-20100129144418-2xb8ys05vjrdiw6o.bundle
| Thread |
|---|
| • bzr commit into mysql-5.6-next-mr branch (kostja:3080) Bug#46272 | Konstantin Osipov | 29 Jan |