diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-04-01 16:07:58 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-04-01 16:07:58 +0400 |
commit | 179b3380b3f9877e974ca9c069ae1f0df3d7d389 (patch) | |
tree | 7f9d9dbb8714b984a50b6139b2a637708f8cdea0 | |
parent | 66acbbe41ffc92bc953b4d507fbb8eb2241958a9 (diff) | |
download | mariadb-git-179b3380b3f9877e974ca9c069ae1f0df3d7d389.tar.gz |
Applying InnoDB snapshot
Detailed revision comments:
r6787 | marko | 2010-03-10 10:35:06 +0200 (Wed, 10 Mar 2010) | 10 lines
branches/zip: recv_parse_log_rec(): Remove a bogus assertion about page_no.
TODO: We might also consider removing recv_max_parsed_page_no, because
it does not make much sense with *.ibd files.
recv_report_corrupt_log(), recv_scan_log_recs(): Abort when a
corrupted log record has been found, unless innodb_force_recovery has
been set.
This fixes Issue #464.
rb://265 approved by Heikki Tuuri
-rw-r--r-- | storage/innodb_plugin/ChangeLog | 7 | ||||
-rw-r--r-- | storage/innodb_plugin/log/log0recv.c | 27 |
2 files changed, 25 insertions, 9 deletions
diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index d7d1e89c147..57ad1208de0 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,10 @@ +2010-03-10 The InnoDB Team + + * log/log0recv.c: + Remove a bogus assertion about page numbers exceeding 0x90000000 + in the redo log. Abort when encountering a corrupted redo log + record, unless innodb_force_recovery is set. + 2010-03-09 The InnoDB Team * handler/ha_innodb.cc: diff --git a/storage/innodb_plugin/log/log0recv.c b/storage/innodb_plugin/log/log0recv.c index de026cad7b7..e5a67f28de6 100644 --- a/storage/innodb_plugin/log/log0recv.c +++ b/storage/innodb_plugin/log/log0recv.c @@ -2052,15 +2052,6 @@ recv_parse_log_rec( } #endif /* UNIV_LOG_LSN_DEBUG */ - /* Check that page_no is sensible */ - - if (UNIV_UNLIKELY(*page_no > 0x8FFFFFFFUL)) { - - recv_sys->found_corrupt_log = TRUE; - - return(0); - } - new_ptr = recv_parse_or_apply_log_rec_body(*type, new_ptr, end_ptr, NULL, NULL); if (UNIV_UNLIKELY(new_ptr == NULL)) { @@ -2169,6 +2160,14 @@ recv_report_corrupt_log( putc('\n', stderr); } +#ifndef UNIV_HOTBACKUP + if (!srv_force_recovery) { + fputs("InnoDB: Set innodb_force_recovery" + " to ignore this error.\n", stderr); + ut_error; + } +#endif /* !UNIV_HOTBACKUP */ + fputs("InnoDB: WARNING: the log file may have been corrupt and it\n" "InnoDB: is possible that the log scan did not proceed\n" "InnoDB: far enough in recovery! Please run CHECK TABLE\n" @@ -2683,6 +2682,16 @@ recv_scan_log_recs( recv_sys->found_corrupt_log = TRUE; +#ifndef UNIV_HOTBACKUP + if (!srv_force_recovery) { + fputs("InnoDB: Set" + " innodb_force_recovery" + " to ignore this error.\n", + stderr); + ut_error; + } +#endif /* !UNIV_HOTBACKUP */ + } else if (!recv_sys->found_corrupt_log) { more_data = recv_sys_add_to_parsing_buf( log_block, scanned_lsn); |