diff options
author | Andrei Elkin <andrei.elkin@oracle.com> | 2011-10-27 17:14:41 +0300 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@oracle.com> | 2011-10-27 17:14:41 +0300 |
commit | a7127418a78fea97d93d8adb9d3c3c124b8e3720 (patch) | |
tree | e25dca9ae13ab5c59597fca8c33bbf60645adacd /sql/sql_class.h | |
parent | 27341322e424069432dc1811484f90417fd8e9ed (diff) | |
download | mariadb-git-a7127418a78fea97d93d8adb9d3c3c124b8e3720.tar.gz |
Bug#11763573 - 56299: MUTEX DEADLOCK WITH COM_BINLOG_DUMP, BINLOG PURGE, AND PROCESSLIST/KILL
The bug case is similar to one fixed earlier bug_49536.
Deadlock involving LOCK_log appears to be possible because the purge running thread
is holding LOCK_log whereas there is no sense of doing that and which fact was
exploited by the earlier bug fixes.
Fixed with small reengineering of rotate_and_purge(), adding two new methods and
setting up a policy to execute those instead of the former
rotate_and_purge(RP_LOCK_LOG_IS_ALREADY_LOCKED).
The policy for using rotate(), purge() is that if the caller acquires LOCK_log itself,
it should call rotate(), release the mutex and run purge().
Side effect of this patch is refining error message of bug@11747416 to print
the whole path.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 9f13908d31c..1a51b66f8a6 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -161,9 +161,6 @@ typedef struct st_user_var_events bool unsigned_flag; } BINLOG_USER_VAR_EVENT; -#define RP_LOCK_LOG_IS_ALREADY_LOCKED 1 -#define RP_FORCE_ROTATE 2 - /* The COPY_INFO structure is used by INSERT/REPLACE code. The schema of the row counting by the INSERT/INSERT ... ON DUPLICATE KEY |