summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorramil/ram@mysql.com/ramil.myoffice.izhnet.ru <>2007-06-17 09:56:33 +0500
committerramil/ram@mysql.com/ramil.myoffice.izhnet.ru <>2007-06-17 09:56:33 +0500
commitf47b82906d1ad0f09e2e42948f29575f57eafce4 (patch)
tree9b7ba0d8f6adc066e61a7d8f37402b69711ec0af /sql/lock.cc
parente0adab8ce798c2847a8868b15dab1ea0082c75f8 (diff)
downloadmariadb-git-f47b82906d1ad0f09e2e42948f29575f57eafce4.tar.gz
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
The log tables are by nature PERFORMANCE_SCHEMA tables, which should not be affected by SET GLOBAL READ_ONLY or FLUSH TABLES WITH READ LOCK. The implementation of FLUSH TABLES WITH READ LOCK already ignored log tables. Now with this patch, the implementation of LOCK TABLE also ignore a global read lock for log tables, which was the missing symmetry.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index 6f1dd0669ee..9785bc4ac00 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -707,9 +707,7 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count,
if (!table_ptr[i]-> file->
check_if_locking_is_allowed(thd->lex->sql_command, thd->lex->type,
table_ptr[i], count, i, &system_count,
- (thd == logger.get_general_log_thd()) ||
- (thd == logger.get_slow_log_thd()) ||
- (thd == logger.get_privileged_thread())))
+ logger.is_privileged_thread(thd)))
DBUG_RETURN(0);
}