summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2005-08-03 02:01:27 +0400
committerevgen@moonbone.local <>2005-08-03 02:01:27 +0400
commit706247caae4c33f788a621e643262570c6707ec9 (patch)
treee2a9588b41b4c49006fecb6c2137b5b620396a8f /sql
parent655a86a9e73843d949e17dc9934acaccdb850be0 (diff)
downloadmariadb-git-706247caae4c33f788a621e643262570c6707ec9.tar.gz
Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client
Bug was introduced by cset 1.1659.14.1. Before it server was silently ignoring that lock can't be acquired because it already acquired. This patch makes make_global_read_lock_block_commit() return without error if lock already acquired.
Diffstat (limited to 'sql')
-rw-r--r--sql/lock.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index d51d9083058..568ca2b68af 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -990,7 +990,7 @@ bool make_global_read_lock_block_commit(THD *thd)
make_global_read_lock_block_commit(), do nothing.
*/
if (thd->global_read_lock != GOT_GLOBAL_READ_LOCK)
- DBUG_RETURN(1);
+ DBUG_RETURN(0);
pthread_mutex_lock(&LOCK_global_read_lock);
/* increment this BEFORE waiting on cond (otherwise race cond) */
global_read_lock_blocks_commit++;