summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2018-04-13 09:25:52 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2018-04-13 09:45:29 +0300
commit71ceed75232952a77dfb7722440cbb1123935e76 (patch)
tree62747034109d5993eadf2f2a8b0b158d3a0b5312
parentfe20fe0d0af38450aa570883563ee2fe5e543747 (diff)
downloadmariadb-git-71ceed75232952a77dfb7722440cbb1123935e76.tar.gz
MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Use block->page.offset for checking page number.
-rw-r--r--storage/innobase/row/row0import.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index 2e8e709db37..6ec06ab1933 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -3463,7 +3463,7 @@ page_corrupted:
/* When tablespace is encrypted or compressed its
first page (i.e. page 0) is not encrypted or
compressed and there is no need to copy frame. */
- if (encrypted && i != 0) {
+ if (encrypted && block->page.id.page_no() != 0) {
byte *local_frame = callback.get_frame(block);
ut_ad((writeptr + (i * size)) != local_frame);
memcpy((writeptr + (i * size)), local_frame, size);