mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Give a readable error if aria_log page numbers doesn't match
MDEV-18461 Aria crash recovery failures This does not fix the bug reported in the MDEV, but now we get an error message of the problem instead of an assert.
This commit is contained in:
parent
204434f2d0
commit
793e5be770
1 changed files with 9 additions and 2 deletions
|
@ -3856,7 +3856,14 @@ my_bool translog_init_with_table(const char *directory,
|
|||
my_bool pageok;
|
||||
|
||||
DBUG_PRINT("info", ("The log is really present"));
|
||||
DBUG_ASSERT(sure_page <= last_page);
|
||||
if (sure_page > last_page)
|
||||
{
|
||||
my_printf_error(HA_ERR_GENERIC, "Aria engine: log data error\n"
|
||||
"last_log_page: " LSN_FMT " is less than\n"
|
||||
"checkpoint page: " LSN_FMT, MYF(0),
|
||||
LSN_IN_PARTS(last_page), LSN_IN_PARTS(sure_page));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* TODO: check page size */
|
||||
|
||||
|
@ -4004,7 +4011,7 @@ my_bool translog_init_with_table(const char *directory,
|
|||
if (!logs_found)
|
||||
{
|
||||
TRANSLOG_FILE *file= (TRANSLOG_FILE*)my_malloc(sizeof(TRANSLOG_FILE),
|
||||
MYF(0));
|
||||
MYF(MY_WME));
|
||||
DBUG_PRINT("info", ("The log is not found => we will create new log"));
|
||||
if (file == NULL)
|
||||
goto err;
|
||||
|
|
Loading…
Reference in a new issue