[Commits] f29060e551e: Fix test failure.

jan jan.lindstrom at mariadb.com
Tue Mar 14 16:02:52 EET 2017


revision-id: f29060e551e553b88d9a71f115aed49ed9a9bc92 (mariadb-10.1.21-94-gf29060e551e)
parent(s): b94d1fe4a213985ae5b62e827c86bfee42e8b7da
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-03-14 16:02:46 +0200
message:

Fix test failure.

---
 storage/innobase/buf/buf0buf.cc | 7 ++++++-
 storage/xtradb/buf/buf0buf.cc   | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 5c07c7cdfc3..7319f7a45f6 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -6114,7 +6114,12 @@ buf_page_encrypt_before_write(
 	fil_space_t* space = fil_space_acquire_silent(space_id);
 
 	/* Tablespace must exist during write operation */
-	ut_ad(space);
+	if (!space) {
+		/* This could be true on discard if we have injected a error
+		case e.g. in innodb.innodb-wl5522-debug-zip so that space
+		is already marked as stop_new_ops = true. */
+		return src_frame;
+	}
 
 	fil_space_crypt_t* crypt_data = space->crypt_data;
 	bool encrypted = true;
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 880336ccea9..361861a6927 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -6274,7 +6274,12 @@ buf_page_encrypt_before_write(
 	fil_space_t* space = fil_space_acquire_silent(space_id);
 
 	/* Tablespace must exist during write operation */
-	ut_ad(space);
+	if (!space) {
+		/* This could be true on discard if we have injected a error
+		case e.g. in innodb.innodb-wl5522-debug-zip so that space
+		is already marked as stop_new_ops = true. */
+		return src_frame;
+	}
 
 	fil_space_crypt_t* crypt_data = space->crypt_data;
 	bool encrypted = true;


More information about the commits mailing list