[Commits] c8035da: Add more information if page state is not correct.

Jan Lindström jan.lindstrom at mariadb.com
Tue Mar 10 14:06:16 EET 2015


revision-id: c8035da9b8d037b43c27268b37df40e587780bec
parent(s): f7d196bb2e605766668895027c48728f03803734
committer: Jan Lindström
branch nick: 10.1
timestamp: 2015-03-10 14:05:57 +0200
message:

Add more information if page state is not correct.

---
 storage/innobase/include/buf0buf.ic | 6 ++++++
 storage/xtradb/include/buf0buf.ic   | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic
index 9bbafbc..842aa67 100644
--- a/storage/innobase/include/buf0buf.ic
+++ b/storage/innobase/include/buf0buf.ic
@@ -275,6 +275,12 @@ buf_page_set_state(
 	}
 #endif /* UNIV_DEBUG */
 	bpage->state = state;
+#ifdef UNIV_DEBUG
+	if( buf_page_get_state(bpage) != state) {
+		fprintf(stderr, "InnoDB: Error: Requested state %d current state %d old_state %d\n",
+			state, buf_page_get_state(bpage), old_state);
+	}
+#endif
 	ut_ad(buf_page_get_state(bpage) == state);
 }
 
diff --git a/storage/xtradb/include/buf0buf.ic b/storage/xtradb/include/buf0buf.ic
index 8917c8f..b4cbba2 100644
--- a/storage/xtradb/include/buf0buf.ic
+++ b/storage/xtradb/include/buf0buf.ic
@@ -277,7 +277,14 @@ buf_page_set_state(
 		break;
 	}
 #endif /* UNIV_DEBUG */
+
 	bpage->state = state;
+#ifdef UNIV_DEBUG
+	if( buf_page_get_state(bpage) != state) {
+		fprintf(stderr, "InnoDB: Error: Requested state %d current state %d old_state %d\n",
+			state, buf_page_get_state(bpage), old_state);
+	}
+#endif
 	ut_ad(buf_page_get_state(bpage) == state);
 }
 


More information about the commits mailing list