diff options
author | Satya B <satya.bn@sun.com> | 2009-03-18 11:16:21 +0530 |
---|---|---|
committer | Satya B <satya.bn@sun.com> | 2009-03-18 11:16:21 +0530 |
commit | bbd694a3b0f80de49207531855edaec09546ebf5 (patch) | |
tree | 266da795b85d6136282fe29653027e0a53cc7301 /storage | |
parent | c1b700faa400aa41215d8ca33e4856cebcb79b8a (diff) | |
download | mariadb-git-bbd694a3b0f80de49207531855edaec09546ebf5.tar.gz |
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.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/archive/ha_archive.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 7edfca53751..d20ab3bf723 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -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); |