From 1a600125ff77b57f6bcb57ba2fff45293ab7257d Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Fri, 12 Apr 2013 18:06:51 +0500 Subject: MDEV-3917 multiple use locks (GET_LOCK) in one connection. The patch contributed by Konstantin Osipov applied. Native comments: Implement multiple user-level locks per connection. GET_LOCK() function in MySQL allows a connection to hold at most one user level lock. Taking a new lock automatically releases the old lock, if any. The limit of one lock per session existed since early versions of MySQL didn't have a deadlock detector for SQL locks. MDL patches in MySQL 5.5 added a deadlock detector, so starting from 5.5 it became possible to take multiple locks in any order -- a deadlock, should it occur, would be detected and an error returned to the client which closed the wait chain. This is exactly what is done in this patch: ULLs are moved to use MDL subsystem. --- sql/sql_reload.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_reload.cc') diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 2720dc7cd74..e9c9dc86e41 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -205,6 +205,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, DBUG_ASSERT(!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || thd->handler_tables_hash.records || + thd->ull_hash.records || thd->global_read_lock.is_acquired()); /* -- cgit v1.2.1