summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--innobase/srv/srv0start.c5
-rw-r--r--innobase/trx/trx0sys.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index ec0546f8c66..552355e5d45 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1168,7 +1168,10 @@ innobase_start_or_create_for_mysql(void)
and restore them from the doublewrite buffer if
possible */
- trx_sys_doublewrite_restore_corrupt_pages();
+ if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {
+
+ trx_sys_doublewrite_restore_corrupt_pages();
+ }
}
srv_normalize_path_for_win(srv_arch_dir);
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index c403cd447e3..51aad60d3e2 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -340,7 +340,6 @@ trx_sys_doublewrite_restore_corrupt_pages(void)
/* It is an unwritten doublewrite buffer page:
do nothing */
-
} else {
/* Read in the actual page from the data files */
@@ -357,9 +356,19 @@ trx_sys_doublewrite_restore_corrupt_pages(void)
"InnoDB: Trying to recover it from the doublewrite buffer.\n");
if (buf_page_is_corrupted(page)) {
+ fprintf(stderr,
+ "InnoDB: Dump of the page:\n");
+ buf_page_print(read_buf);
+ fprintf(stderr,
+ "InnoDB: Dump of corresponding page in doublewrite buffer:\n");
+ buf_page_print(page);
+
fprintf(stderr,
"InnoDB: Also the page in the doublewrite buffer is corrupt.\n"
- "InnoDB: Cannot continue operation.\n");
+ "InnoDB: Cannot continue operation.\n"
+ "InnoDB: You can try to recover the database with the my.cnf\n"
+ "InnoDB: option:\n"
+ "InnoDB: set-variable=innodb_force_recovery=6\n");
exit(1);
}