mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fix for BUG#32880 - Repairing Archive table fails with internal error 144
Any statement reading corrupt archive data file (CHECK/REPAIR/SELECT/UPDATE/DELETE) may cause assertion failure in debug builds. This assertion has been removed and an error is returned instead. Also fixed that CHECK/REPAIR returns vague error message when it mets corruption in archive data file. This is fixed by returning proper error code. mysql-test/r/archive.result: A test case for BUG#32880 mysql-test/std_data/bug32880.ARN: corrupted archive table to test check and repair table operation mysql-test/std_data/bug32880.ARZ: corrupted archive table to test check and repair table operation mysql-test/std_data/bug32880.frm: corrupted archive table to test check and repair table operation mysql-test/t/archive.test: A test case for BUG#32880 storage/archive/ha_archive.cc: Fixed unpack_row() to return the error instead of throwing assertion and also fixed repair() to throw better error when repair table operation fails on corrupted archive table
This commit is contained in:
parent
da3c4375cf
commit
497db6ac0f
6 changed files with 36 additions and 4 deletions
|
|
@ -1076,11 +1076,9 @@ int ha_archive::unpack_row(azio_stream *file_to_read, uchar *record)
|
|||
|
||||
read= azread(file_to_read, record_buffer->buffer, row_len, &error);
|
||||
|
||||
DBUG_ASSERT(row_len == read);
|
||||
|
||||
if (read != row_len || error)
|
||||
{
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
|
||||
}
|
||||
|
||||
/* Copy null bits */
|
||||
|
|
@ -1257,7 +1255,7 @@ int ha_archive::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
int rc= optimize(thd, check_opt);
|
||||
|
||||
if (rc)
|
||||
DBUG_RETURN(HA_ERR_CRASHED_ON_REPAIR);
|
||||
DBUG_RETURN(HA_ADMIN_CORRUPT);
|
||||
|
||||
share->crashed= FALSE;
|
||||
DBUG_RETURN(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue