diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-06-06 12:49:34 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-06-06 12:54:34 +0530 |
commit | bb5d04c9b809b6e5542a0739124fc214807d1615 (patch) | |
tree | 7158345d1f30a2cc53f430015742f075f37ec92f /storage | |
parent | d7c8423a3d44a5eb9bb22efd957eab3f32497b0f (diff) | |
download | mariadb-git-bb5d04c9b809b6e5542a0739124fc214807d1615.tar.gz |
MDEV-19695 Import tablespace doesn't work with ROW_FORMAT=COMPRESSED encrypted tablespace
Problem:
=======
fil_iterate() writes imported tablespace page0 as it is to discarded
tablespace. Space id wasn't even changed. While opening the tablespace,
tablespace fails with space id mismatch error.
Fix:
====
fil_iterate() copies the page0 with discarded space id to imported
tablespace.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/row/row0import.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 036b657e36c..abadeafba9c 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -3421,8 +3421,12 @@ page_corrupted: FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + src)) { not_encrypted: - if (!page_compressed - && !block->page.zip.data) { + if (block->page.id.page_no() == 0 + && block->page.zip.data) { + block->page.zip.data = src; + frame_changed = true; + } else if (!page_compressed + && !block->page.zip.data) { block->frame = src; frame_changed = true; } else { @@ -3513,7 +3517,11 @@ not_encrypted: } if (frame_changed) { - block->frame = dst; + if (block->page.zip.data) { + block->page.zip.data = dst; + } else { + block->frame = dst; + } } src = io_buffer + (i * size); |