Commit 4fac6269 authored by Jan Lindström's avatar Jan Lindström

MDEV-8390: innodb.innodb-flush-changed-page-bitmaps crashes

Analysis: Flush changed page bitmaps calls log_online_follow_redo_log
that later calls log_group_read_log_seg with release_mutex = true
and that causes the log_sys mutex being released before
log_decrypt_after_read function that later required log_sys mutex.

Fix: Enter log_sys mutex before log_decrypt_after_read if mutex
is released and release the mutex after the function if we
acquired it before function call.
parent 08fa60e5
...@@ -2581,8 +2581,16 @@ loop: ...@@ -2581,8 +2581,16 @@ loop:
(ulint) (source_offset % UNIV_PAGE_SIZE), (ulint) (source_offset % UNIV_PAGE_SIZE),
len, buf, (type == LOG_ARCHIVE) ? &log_archive_io : NULL, 0); len, buf, (type == LOG_ARCHIVE) ? &log_archive_io : NULL, 0);
if (release_mutex) {
mutex_enter(&log_sys->mutex);
}
log_decrypt_after_read(buf, len); log_decrypt_after_read(buf, len);
if (release_mutex) {
mutex_exit(&log_sys->mutex);
}
start_lsn += len; start_lsn += len;
buf += len; buf += len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment