diff options
author | unknown <evgen@moonbone.local> | 2005-08-03 02:01:27 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-08-03 02:01:27 +0400 |
commit | 5792c4d162e333698ca9596b52caebd30616fc00 (patch) | |
tree | e2a9588b41b4c49006fecb6c2137b5b620396a8f /sql/lock.cc | |
parent | 7246ca6ca971e1a9a09f6e7f7663f6b0ec21c8a1 (diff) | |
download | mariadb-git-5792c4d162e333698ca9596b52caebd30616fc00.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.
mysql-test/t/flush_table.test:
Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client.
mysql-test/r/flush_table.result:
Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client.
sql/lock.cc:
Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client.
Make make_global_read_lock_block_commit() return without error if lock already acquired.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 2 |
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++; |