Commit 9ac8be4e authored by Marko Mäkelä's avatar Marko Mäkelä

Include some advice in the crash-upgrade message

parent 95e2595d
...@@ -58,6 +58,7 @@ Created 9/20/1997 Heikki Tuuri ...@@ -58,6 +58,7 @@ Created 9/20/1997 Heikki Tuuri
#include "trx0roll.h" #include "trx0roll.h"
#include "row0merge.h" #include "row0merge.h"
#include "fil0pagecompress.h" #include "fil0pagecompress.h"
#include "log.h"
/** Log records are stored in the hash table in chunks at most of this size; /** Log records are stored in the hash table in chunks at most of this size;
this must be less than srv_page_size as it is stored in the buffer pool */ this must be less than srv_page_size as it is stored in the buffer pool */
...@@ -1137,7 +1138,7 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt) ...@@ -1137,7 +1138,7 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt)
byte* buf = log_sys.buf; byte* buf = log_sys.buf;
static const char* NO_UPGRADE_RECOVERY_MSG = static const char* NO_UPGRADE_RECOVERY_MSG =
"Upgrade after a crash is not supported." "InnoDB: Upgrade after a crash is not supported."
" This redo log was created before MariaDB 10.2.2"; " This redo log was created before MariaDB 10.2.2";
fil_io(IORequestLogRead, true, fil_io(IORequestLogRead, true,
...@@ -1150,21 +1151,24 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt) ...@@ -1150,21 +1151,24 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt)
if (log_block_calc_checksum_format_0(buf) if (log_block_calc_checksum_format_0(buf)
!= log_block_get_checksum(buf) != log_block_get_checksum(buf)
&& !log_crypt_101_read_block(buf)) { && !log_crypt_101_read_block(buf)) {
ib::error() << NO_UPGRADE_RECOVERY_MSG sql_print_error("%s, and it appears corrupted.",
<< ", and it appears corrupted."; NO_UPGRADE_RECOVERY_MSG);
return(DB_CORRUPTION); return DB_CORRUPTION;
} }
if (log_block_get_data_len(buf) if (log_block_get_data_len(buf)
== (source_offset & (OS_FILE_LOG_BLOCK_SIZE - 1))) { == (source_offset & (OS_FILE_LOG_BLOCK_SIZE - 1))) {
} else if (crypt) { } else if (crypt) {
ib::error() << "Cannot decrypt log for upgrading." sql_print_error("InnoDB: Cannot decrypt log for upgrading."
" The encrypted log was created" " The encrypted log was created"
" before MariaDB 10.2.2."; " before MariaDB 10.2.2.");
return DB_ERROR; return DB_ERROR;
} else { } else {
ib::error() << NO_UPGRADE_RECOVERY_MSG << "."; sql_print_error("%s. You must start up and shut down"
return(DB_ERROR); " MariaDB 10.1 or MySQL 5.6 or earlier"
" on the data directory.",
NO_UPGRADE_RECOVERY_MSG);
return DB_ERROR;
} }
/* Mark the redo log for upgrading. */ /* Mark the redo log for upgrading. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment