[Commits] 109b8582583: MDEV-13432: Assertion failure in buf0rea.cc line 577

jan jan.lindstrom at mariadb.com
Thu Aug 17 07:22:32 EEST 2017


revision-id: 109b8582583296c4bb4ee41bc7649f6cd2254124 (mariadb-10.1.26-7-g109b8582583)
parent(s): 48fe832650ae2dc0c2eaa957abfa959b0a2670aa
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-08-17 07:19:12 +0300
message:

MDEV-13432: Assertion failure in buf0rea.cc line 577

Page read could return DB_PAGE_CORRUPTED error that should
be reported and passed to upper layer. In case of unknown
error code we should print both number and string.

---
 storage/innobase/buf/buf0rea.cc | 23 +++++++++++++----------
 storage/xtradb/buf/buf0rea.cc   | 20 ++++++++++++--------
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc
index 5525d8dd534..d2a48975905 100644
--- a/storage/innobase/buf/buf0rea.cc
+++ b/storage/innobase/buf/buf0rea.cc
@@ -378,13 +378,14 @@ buf_read_ahead_random(
 					space, i);
 				break;
 			case DB_DECRYPTION_FAILED:
+			case DB_PAGE_CORRUPTED:
 				ib_logf(IB_LOG_LEVEL_ERROR,
-					"Random readahead failed to decrypt page "
-					ULINTPF "." ULINTPF " .",
+					"Random readahead failed to decrypt page or page corrupted "
+					ULINTPF ":" ULINTPF " .",
 					space, i);
 				break;
 			default:
-				ut_error;
+				ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in random readahead", err, ut_strerr(err));
 			}
 		}
 	}
@@ -514,15 +515,15 @@ buf_read_page_async(
 			" in nonexisting or being-dropped tablespace",
 			space, offset);
 		break;
-
 	case DB_DECRYPTION_FAILED:
+	case DB_PAGE_CORRUPTED:
 		ib_logf(IB_LOG_LEVEL_ERROR,
-			"Async page read failed to decrypt page "
+			"Async page read failed to decrypt page or page corrupted "
 			ULINTPF ":" ULINTPF ".",
 			space, offset);
 		break;
 	default:
-		ut_error;
+		ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in async page read", err, ut_strerr(err));
 	}
 
 	srv_stats.buf_pool_reads.add(count);
@@ -798,13 +799,14 @@ buf_read_ahead_linear(
 					space, i);
 				break;
 			case DB_DECRYPTION_FAILED:
+			case DB_PAGE_CORRUPTED:
 				ib_logf(IB_LOG_LEVEL_ERROR,
-					"Linear readahead failed to decrypt page "
+					"Linear readahead failed to decrypt page or page corrupted"
 					ULINTPF ":" ULINTPF ".",
 					space, i);
 				break;
 			default:
-				ut_error;
+				ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in linear readahead", err, ut_strerr(err));
 			}
 		}
 	}
@@ -901,13 +903,14 @@ buf_read_ibuf_merge_pages(
 						      zip_size, FALSE);
 			break;
 		case DB_DECRYPTION_FAILED:
+		case DB_PAGE_CORRUPTED:
 			ib_logf(IB_LOG_LEVEL_ERROR,
-				"Failed to decrypt insert buffer page "
+				"Failed to decrypt insert buffer page or page corrupted "
 				ULINTPF ":" ULINTPF ".",
 				space_ids[i], page_nos[i]);
 			break;
 		default:
-			ut_error;
+			ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in insert buffer read", err, ut_strerr(err));
 		}
 	}
 
diff --git a/storage/xtradb/buf/buf0rea.cc b/storage/xtradb/buf/buf0rea.cc
index b2b737b8d40..76b71550710 100644
--- a/storage/xtradb/buf/buf0rea.cc
+++ b/storage/xtradb/buf/buf0rea.cc
@@ -428,13 +428,14 @@ buf_read_ahead_random(
 					space, i);
 				break;
 			case DB_DECRYPTION_FAILED:
+			case DB_PAGE_CORRUPTED:
 				ib_logf(IB_LOG_LEVEL_ERROR,
-					"Random readahead failed to decrypt page "
+					"Random readahead failed to decrypt page or page corrupted "
 					ULINTPF ":" ULINTPF ".",
 					i, space);
 				break;
 			default:
-				ut_error;
+				ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in random readahead", err, ut_strerr(err));
 			}
 		}
 	}
@@ -570,13 +571,14 @@ buf_read_page_async(
 		break;
 
 	case DB_DECRYPTION_FAILED:
+	case DB_PAGE_CORRUPTED:
 		ib_logf(IB_LOG_LEVEL_ERROR,
-			"Async page read failed to decrypt page "
+			"Async page read failed to decrypt page or page corrupted "
 			ULINTPF ":" ULINTPF ".",
 			space, offset);
 		break;
 	default:
-		ut_error;
+		ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in async page read", err, ut_strerr(err));
 	}
 
 	srv_stats.buf_pool_reads.add(count);
@@ -863,13 +865,14 @@ buf_read_ahead_linear(
 				break;
 
 			case DB_DECRYPTION_FAILED:
+			case DB_PAGE_CORRUPTED:
 				ib_logf(IB_LOG_LEVEL_ERROR,
-					"Linear readahead failed to decrypt page "
+					"Linear readahead failed to decrypt page or page corrupted"
 					ULINTPF ":" ULINTPF ".",
 					i, space);
 				break;
 			default:
-				ut_error;
+				ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in linear readahead", err, ut_strerr(err));
 			}
 		}
 	}
@@ -963,13 +966,14 @@ buf_read_ibuf_merge_pages(
 			ibuf_delete_for_discarded_space(space_ids[i]);
 			break;
 		case DB_DECRYPTION_FAILED:
+		case DB_PAGE_CORRUPTED:
 			ib_logf(IB_LOG_LEVEL_ERROR,
-				"Failed to decrypt insert buffer page "
+				"Failed to decrypt insert buffer page or page corrupted "
 				ULINTPF ":" ULINTPF ".",
 				space_ids[i], page_nos[i]);
 			break;
 		default:
-			ut_error;
+			ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in insert buffer read", err, ut_strerr(err));
 		}
 	}
 


More information about the commits mailing list