diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2008-04-08 10:20:58 +0500 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2008-04-08 10:20:58 +0500 |
commit | 5397f8c90d6a9fdc38278384bb1d3c695d99d5d3 (patch) | |
tree | 26ae6d2fe47544933c13ab27096db0b064cf0088 /sql/lock.cc | |
parent | 5d725bfdf8b90dd0fe65d68e8c2991850d283ce7 (diff) | |
download | mariadb-git-5397f8c90d6a9fdc38278384bb1d3c695d99d5d3.tar.gz |
Fix for bug #35732: read-only blocks SELECT statements in InnoDB
Problem: SELECTs prohibited for a transactional SE in autocommit mode
if read_only is set.
Fix: allow them.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index a0d6faa6604..675b94c2175 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -1533,6 +1533,7 @@ void start_waiting_global_read_lock(THD *thd) if (unlikely(thd->global_read_lock)) DBUG_VOID_RETURN; (void) pthread_mutex_lock(&LOCK_global_read_lock); + DBUG_ASSERT(protect_against_global_read_lock); tmp= (!--protect_against_global_read_lock && (waiting_for_read_lock || global_read_lock_blocks_commit)); (void) pthread_mutex_unlock(&LOCK_global_read_lock); |