summaryrefslogtreecommitdiff
path: root/myisam/mi_check.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-01-20 09:05:37 +0100
committerunknown <serg@serg.mylan>2004-01-20 09:05:37 +0100
commit17bfc6735ccd1e767fbdc7b9b796f0652bb33d1a (patch)
tree899c7b90b7eb09c15d506c7a4e3177ac9075b59c /myisam/mi_check.c
parent4681ca8dfd8076f2a8b9564665f388fe9e85a1be (diff)
downloadmariadb-git-17bfc6735ccd1e767fbdc7b9b796f0652bb33d1a.tar.gz
two bugs in parallel repair fixed
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r--myisam/mi_check.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 38e48eb5e06..8581f79c99d 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -922,7 +922,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
info->checksum=mi_checksum(info,record);
if (param->testflag & (T_EXTEND | T_MEDIUM | T_VERBOSE))
{
- if (_mi_rec_check(info,record, info->rec_buff))
+ if (_mi_rec_check(info,record, info->rec_buff,block_info.rec_len))
{
mi_check_print_error(param,"Found wrong packed record at %s",
llstr(start_recpos,llbuff));
@@ -2350,6 +2350,11 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
sort_param[i].record= (((char *)(sort_param+share->base.keys))+
(share->base.pack_reclength * i));
+ if (!mi_alloc_rec_buff(info, -1, &sort_param[i].rec_buff))
+ {
+ mi_check_print_error(param,"Not enough memory!");
+ goto err;
+ }
sort_param[i].key_length=share->rec_reflength;
for (keyseg=sort_param[i].keyinfo->seg; keyseg->type != HA_KEYTYPE_END;
@@ -2911,7 +2916,8 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
info->checksum=mi_checksum(info,sort_param->record);
if ((param->testflag & (T_EXTEND | T_REP)) || searching)
{
- if (_mi_rec_check(info, sort_param->record, sort_param->rec_buff))
+ if (_mi_rec_check(info, sort_param->record, sort_param->rec_buff,
+ sort_param->find_length))
{
mi_check_print_info(param,"Found wrong packed record at %s",
llstr(sort_param->start_recpos,llbuff));