Skip to content

Commit

Permalink
Merge pull request #3176 from dutow/ps-5.7-ps5610
Browse files Browse the repository at this point in the history
PS-5610: Fix keyring redo encryption in 32 bit builds (5.7)
  • Loading branch information
dutow authored May 14, 2019
2 parents f91a9f2 + 98c1c2d commit 0796b5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion storage/innobase/fsp/fsp0fsp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ fsp_header_fill_encryption_info(

/* Write master key id. */
mach_write_to_4(ptr, key_version);
ptr += sizeof(ulint);
ptr += 4;

/* Write server uuid. */
memcpy(ptr, Encryption::uuid, ENCRYPTION_SERVER_UUID_LEN);
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/log/log0log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ log_read_encryption()
unsigned char* info_ptr = log_block_buf + LOG_HEADER_CREATOR_END + ENCRYPTION_MAGIC_SIZE;
uint version = mach_read_from_4(info_ptr);

memcpy(iv, info_ptr + ENCRYPTION_SERVER_UUID_LEN + 8, ENCRYPTION_KEY_LEN);
memcpy(iv, info_ptr + ENCRYPTION_SERVER_UUID_LEN + 4, ENCRYPTION_KEY_LEN);

#ifdef UNIV_ENCRYPT_DEBUG
fprintf(stderr, "Using redo log encryption key version: %u\n", version);
Expand Down

0 comments on commit 0796b5d

Please sign in to comment.