[Commits] d904fdc8161: Fixed test failure on innodb.innodb_bug14147491.

jan jan.lindstrom at mariadb.com
Wed Mar 22 12:23:08 EET 2017


revision-id: d904fdc816108ee1013693ba2cc586a3c8fbf067 (mariadb-10.2.4-81-gd904fdc8161)
parent(s): 37e3388c150aec848f801c216c6e1fea9f9797a9
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-03-22 12:21:55 +0200
message:

Fixed test failure on innodb.innodb_bug14147491.

Failure was because after error injection we did incorrect
operations.

---
 storage/innobase/buf/buf0buf.cc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 11fe77d75de..21866d766c3 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -4280,6 +4280,7 @@ buf_page_get_gen(
 
 	if (block == NULL) {
 		buf_page_t*	bpage=NULL;
+		bool corrupted = false;
 
 		/* Page not in buf_pool: needs to be read from file */
 
@@ -4345,7 +4346,10 @@ buf_page_get_gen(
 		} else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
 			++retries;
 
-			bool corrupted = false;
+			DBUG_EXECUTE_IF(
+				"innodb_page_corruption_retries",
+				goto force_fail;
+			);
 
 			if (bpage) {
 				corrupted = buf_page_check_corrupt(bpage);
@@ -4375,18 +4379,14 @@ buf_page_get_gen(
 				return (NULL);
 			}
 
-			DBUG_EXECUTE_IF(
-				"innodb_page_corruption_retries",
-				retries = BUF_PAGE_READ_MAX_RETRIES;
-			);
 		} else {
-			bool corrupted = false;
 
 			if (bpage) {
 				corrupted = buf_page_check_corrupt(bpage);
 			}
 
 			if (corrupted && !bpage->encrypted) {
+force_fail:
 				ib::fatal() << "Unable to read page " << page_id
 					    << " into the buffer pool after "
 					    << BUF_PAGE_READ_MAX_RETRIES << " attempts."


More information about the commits mailing list