summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-06-29 12:48:42 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-06-29 12:48:42 +0300
commit4fac6269172eab2be0490a12936248113d14848d (patch)
tree45d9db2a5d47ec22d24f754c3f784a420fadff71 /storage
parent08fa60e5f3643cd87bb1e4578071f4db3557f776 (diff)
downloadmariadb-git-4fac6269172eab2be0490a12936248113d14848d.tar.gz
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.
Diffstat (limited to 'storage')
-rw-r--r--storage/xtradb/log/log0log.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc
index 9a1eb1b1b28..64459b9c2c7 100644
--- a/storage/xtradb/log/log0log.cc
+++ b/storage/xtradb/log/log0log.cc
@@ -2581,8 +2581,16 @@ loop:
(ulint) (source_offset % UNIV_PAGE_SIZE),
len, buf, (type == LOG_ARCHIVE) ? &log_archive_io : NULL, 0);
+ if (release_mutex) {
+ mutex_enter(&log_sys->mutex);
+ }
+
log_decrypt_after_read(buf, len);
+ if (release_mutex) {
+ mutex_exit(&log_sys->mutex);
+ }
+
start_lsn += len;
buf += len;