mirror of
https://github.com/MariaDB/server.git
synced 2026-05-08 16:14:30 +02:00
two bugs in parallel repair fixed
This commit is contained in:
parent
4681ca8dfd
commit
17bfc6735c
3 changed files with 20 additions and 11 deletions
|
|
@ -148,7 +148,7 @@ static int write_dynamic_record(MI_INFO *info, const byte *record,
|
|||
} while (reclength);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
err:
|
||||
err:
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
|
@ -744,7 +744,8 @@ uint _mi_rec_pack(MI_INFO *info, register byte *to, register const byte *from)
|
|||
Returns 0 if record is ok.
|
||||
*/
|
||||
|
||||
my_bool _mi_rec_check(MI_INFO *info,const char *record, byte *rec_buff)
|
||||
my_bool _mi_rec_check(MI_INFO *info,const char *record, byte *rec_buff,
|
||||
ulong packed_length)
|
||||
{
|
||||
uint length,new_length,flag,bit,i;
|
||||
char *pos,*end,*packpos,*to;
|
||||
|
|
@ -836,8 +837,7 @@ my_bool _mi_rec_check(MI_INFO *info,const char *record, byte *rec_buff)
|
|||
to+=length;
|
||||
}
|
||||
}
|
||||
if (info->packed_length != (uint) (to - rec_buff)
|
||||
+ test(info->s->calc_checksum) ||
|
||||
if (packed_length != (uint) (to - rec_buff) + test(info->s->calc_checksum) ||
|
||||
(bit != 1 && (flag & ~(bit - 1))))
|
||||
goto err;
|
||||
if (info->s->calc_checksum)
|
||||
|
|
@ -850,7 +850,7 @@ my_bool _mi_rec_check(MI_INFO *info,const char *record, byte *rec_buff)
|
|||
}
|
||||
DBUG_RETURN(0);
|
||||
|
||||
err:
|
||||
err:
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
|
@ -966,8 +966,8 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
|
|||
if (info->s->calc_checksum)
|
||||
from++;
|
||||
if (to == to_end && from == from_end && (bit == 1 || !(flag & ~(bit-1))))
|
||||
DBUG_RETURN((info->packed_length=found_length));
|
||||
err:
|
||||
DBUG_RETURN(found_length);
|
||||
err:
|
||||
my_errno=HA_ERR_RECORD_DELETED;
|
||||
DBUG_PRINT("error",("to_end: %lx -> %lx from_end: %lx -> %lx",
|
||||
to,to_end,from,from_end));
|
||||
|
|
@ -1210,7 +1210,7 @@ int _mi_cmp_dynamic_record(register MI_INFO *info, register const byte *record)
|
|||
}
|
||||
}
|
||||
my_errno=0;
|
||||
err:
|
||||
err:
|
||||
if (buffer != info->rec_buff)
|
||||
my_afree((gptr) buffer);
|
||||
DBUG_RETURN(my_errno);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue