diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-08 10:39:29 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-08 10:39:29 +0200 |
commit | 9ac8be4e2980aa995117147e39ae5b7ad79fc980 (patch) | |
tree | 153ffa6525b7b695627a626035426eb04d709d20 | |
parent | 95e2595d8dd1e79b14c9038457d174324cd0defe (diff) | |
download | mariadb-git-9ac8be4e2980aa995117147e39ae5b7ad79fc980.tar.gz |
Include some advice in the crash-upgrade message
-rw-r--r-- | storage/innobase/log/log0recv.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index d8b7bd2ce85..e7effd9224f 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -58,6 +58,7 @@ Created 9/20/1997 Heikki Tuuri #include "trx0roll.h" #include "row0merge.h" #include "fil0pagecompress.h" +#include "log.h" /** 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 */ @@ -1137,7 +1138,7 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt) byte* buf = log_sys.buf; 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"; fil_io(IORequestLogRead, true, @@ -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) != log_block_get_checksum(buf) && !log_crypt_101_read_block(buf)) { - ib::error() << NO_UPGRADE_RECOVERY_MSG - << ", and it appears corrupted."; - return(DB_CORRUPTION); + sql_print_error("%s, and it appears corrupted.", + NO_UPGRADE_RECOVERY_MSG); + return DB_CORRUPTION; } if (log_block_get_data_len(buf) == (source_offset & (OS_FILE_LOG_BLOCK_SIZE - 1))) { } else if (crypt) { - ib::error() << "Cannot decrypt log for upgrading." - " The encrypted log was created" - " before MariaDB 10.2.2."; + sql_print_error("InnoDB: Cannot decrypt log for upgrading." + " The encrypted log was created" + " before MariaDB 10.2.2."); return DB_ERROR; } else { - ib::error() << NO_UPGRADE_RECOVERY_MSG << "."; - return(DB_ERROR); + sql_print_error("%s. You must start up and shut down" + " 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. */ |