diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-06-17 09:56:33 +0500 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-06-17 09:56:33 +0500 |
commit | f47b82906d1ad0f09e2e42948f29575f57eafce4 (patch) | |
tree | 9b7ba0d8f6adc066e61a7d8f37402b69711ec0af /sql/log.h | |
parent | e0adab8ce798c2847a8868b15dab1ea0082c75f8 (diff) | |
download | mariadb-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/log.h')
-rw-r--r-- | sql/log.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/log.h b/sql/log.h index 25bcbd6c62d..d92e0117bcc 100644 --- a/sql/log.h +++ b/sql/log.h @@ -600,6 +600,12 @@ public: else return NULL; } + bool is_privileged_thread(THD *thd) + { + return thd == get_general_log_thd() || + thd == get_slow_log_thd() || + thd == get_privileged_thread(); + } }; enum enum_binlog_format { |