[Commits] cbc5157: MDEV-7878: innodb_scrub_background fails sporadically in buildbot (Failing assertion: offset > 0 && offset < UNIV_PAGE_SIZE)

Jan Lindström jan.lindstrom at mariadb.com
Tue Mar 31 09:01:31 EEST 2015


revision-id: cbc5157feb9801310e458f7ed10983ad478c881e
parent(s): f573b65e4173a90a738682837e2f0020c76827ff
committer: Jan Lindström
branch nick: 10.1
timestamp: 2015-03-31 09:00:01 +0300
message:

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.

---
 storage/innobase/fil/fil0crypt.cc | 3 +++
 storage/xtradb/fil/fil0crypt.cc   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 0d2187c..9f8315a 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -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);
diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc
index 0d2187c..9f8315a 100644
--- a/storage/xtradb/fil/fil0crypt.cc
+++ b/storage/xtradb/fil/fil0crypt.cc
@@ -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);


More information about the commits mailing list