diff options
author | unknown <serg@serg.mylan> | 2004-01-20 09:05:37 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-01-20 09:05:37 +0100 |
commit | 17bfc6735ccd1e767fbdc7b9b796f0652bb33d1a (patch) | |
tree | 899c7b90b7eb09c15d506c7a4e3177ac9075b59c /myisam/mi_dynrec.c | |
parent | 4681ca8dfd8076f2a8b9564665f388fe9e85a1be (diff) | |
download | mariadb-git-17bfc6735ccd1e767fbdc7b9b796f0652bb33d1a.tar.gz |
two bugs in parallel repair fixed
Diffstat (limited to 'myisam/mi_dynrec.c')
-rw-r--r-- | myisam/mi_dynrec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index e1bfe4c3ac5..e4e83b716ec 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -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); |