Skip to content
Permalink
Browse files
MDEV-12632: Source and destination overlap in memcpy, encryption.inno…
…db-discard-import-change fails in buildbot with valgrind

Use block->page.offset for checking page number.
  • Loading branch information
Jan Lindström committed Apr 13, 2018
1 parent 82e9681 commit 3855943
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -3551,7 +3551,7 @@ fil_iterate(
/* 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.offset != 0) {
byte *local_frame = callback.get_frame(block);
ut_ad((writeptr + (i * size)) != local_frame);
memcpy((writeptr + (i * size)), local_frame, size);
@@ -3551,7 +3551,7 @@ fil_iterate(
/* 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.offset != 0) {
byte *local_frame = callback.get_frame(block);
ut_ad((writeptr + (i * size)) != local_frame);
memcpy((writeptr + (i * size)), local_frame, size);

0 comments on commit 3855943

Please sign in to comment.