Commit cbc5157f authored by Jan Lindström's avatar Jan Lindström

MDEV-7878: innodb_scrub_background fails sporadically in buildbot (Failing...

MDEV-7878: innodb_scrub_background fails sporadically in buildbot (Failing 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.
parent f573b65e
...@@ -2033,6 +2033,9 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space) ...@@ -2033,6 +2033,9 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space)
RW_X_LATCH, NULL, BUF_GET, RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, &mtr); __FILE__, __LINE__, &mtr);
byte* frame = buf_block_get_frame(block); 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, fil_space_write_crypt_data(space, frame,
crypt_data->page0_offset, crypt_data->page0_offset,
ULINT_MAX, &mtr); ULINT_MAX, &mtr);
......
...@@ -2033,6 +2033,9 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space) ...@@ -2033,6 +2033,9 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space)
RW_X_LATCH, NULL, BUF_GET, RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, &mtr); __FILE__, __LINE__, &mtr);
byte* frame = buf_block_get_frame(block); 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, fil_space_write_crypt_data(space, frame,
crypt_data->page0_offset, crypt_data->page0_offset,
ULINT_MAX, &mtr); ULINT_MAX, &mtr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment