diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2018-12-14 14:33:33 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2018-12-14 14:33:33 +0530 |
commit | 209d50c9eef2ad93716b30c333ec5392ceaccd9f (patch) | |
tree | f83fe57c9bdf0ec25a0c4d2e28c23fa12bb5d395 | |
parent | 980efb0b1fbf2687f65623f55a8dc5542adb1a56 (diff) | |
download | mariadb-git-bb-10.2-23578.tar.gz |
MDEV-12112 corruption in encrypted table may be overlookedbb-10.2-23578
- Fixed two testcase which was hanging by corruption of
encrypted pages.
-rw-r--r-- | extra/mariabackup/fil_cur.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc index 578ef661754..86af91fa172 100644 --- a/extra/mariabackup/fil_cur.cc +++ b/extra/mariabackup/fil_cur.cc @@ -305,6 +305,7 @@ xb_fil_cur_read( fil_space_t* encrypted_space = NULL; bool encrypted = false; static byte tmp_frame[UNIV_PAGE_SIZE_MAX]; + static byte tmp_page[UNIV_PAGE_SIZE_MAX]; xb_ad(!cursor->is_system() || page_size == UNIV_PAGE_SIZE); @@ -409,10 +410,12 @@ read_retry: mutex_exit(&fil_system->mutex); } + memcpy(tmp_page, page, page_size); + if (!fil_space_decrypt( - encrypted_space, tmp_frame, page, &decrypted) + encrypted_space, tmp_frame, tmp_page, &decrypted) || buf_page_is_corrupted( - true, tmp_frame, cursor->page_size, space)) { + true, tmp_page, cursor->page_size, space)) { retry_count--; |