Skip to content

Commit

Permalink
MDEV-7878: innodb_scrub_background fails sporadically in buildbot (Fa…
Browse files Browse the repository at this point in the history
…iling assertion: offset > 0 && offset < UNIV_PAGE_SIZE)

Problem was that when encrypted space was flushed page 0 is
also updated but crypt data offset was sometimes not
calculated.
  • Loading branch information
Jan Lindström committed Mar 31, 2015
1 parent f573b65 commit cbc5157
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/innobase/fil/fil0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,9 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space)
RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, &mtr);
byte* frame = buf_block_get_frame(block);
ulint maxsize = 0;
crypt_data->page0_offset =
fsp_header_get_crypt_offset(zip_size, &maxsize);
fil_space_write_crypt_data(space, frame,
crypt_data->page0_offset,
ULINT_MAX, &mtr);
Expand Down
3 changes: 3 additions & 0 deletions storage/xtradb/fil/fil0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,9 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space)
RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, &mtr);
byte* frame = buf_block_get_frame(block);
ulint maxsize = 0;
crypt_data->page0_offset =
fsp_header_get_crypt_offset(zip_size, &maxsize);
fil_space_write_crypt_data(space, frame,
crypt_data->page0_offset,
ULINT_MAX, &mtr);
Expand Down

0 comments on commit cbc5157

Please sign in to comment.