summaryrefslogtreecommitdiff
path: root/sql/mdl.h
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-02-03 15:09:27 +0100
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-02-03 15:09:27 +0100
commitb417300c9aadeca5d5a0e45af27c398fc57c34a2 (patch)
treed58bcb8c3ad79de839df6f0e710cab64a837b2d1 /sql/mdl.h
parentc8555bdb35d998e99b6fb568f03c63479ff9272d (diff)
downloadmariadb-git-b417300c9aadeca5d5a0e45af27c398fc57c34a2.tar.gz
Bug #50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
failed in open_ltable() The problem was too restrictive asserts that enforced that open_ltable() was called without any active HANDLERs, LOCK TABLES or global read locks. However, this can happen in several cases when opening system tables. The assert would, for example, be triggered when drop function was called from a connection with active HANDLERs as this would cause open_ltable() to be called for mysql.proc. The assert could also be triggered when using table-based general log (mysql.general_log). This patch removes the asserts since they will be triggered in several legitimate cases and because the asserts are no longer relevant due to changes in how locks are released. The patch also fixes set_needs_thr_lock_abort() that before ignored its parameter and always set the member variable to TRUE. Test case added to mdl_sync.test. Thanks to Dmitry Lenev for help with this bug!
Diffstat (limited to 'sql/mdl.h')
-rw-r--r--sql/mdl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mdl.h b/sql/mdl.h
index 5eb86d2488b..24331cf5eac 100644
--- a/sql/mdl.h
+++ b/sql/mdl.h
@@ -540,7 +540,7 @@ public:
always re-try reading it after small timeout and therefore
will see the new value eventually.
*/
- m_needs_thr_lock_abort= TRUE;
+ m_needs_thr_lock_abort= needs_thr_lock_abort;
}
bool get_needs_thr_lock_abort() const
{