Hello!
The patch is ok to push with minor changes,
thank you! See my comments below.
Ingo Struewing wrote:
> ChangeSet@stripped, 2007-12-18 15:19:04+01:00, istruewing@stripped +3 -0
> Bug#33222 - myisam-table drops rows when column is added
> and a char-field > 128 exists
>
> ALTERing a table with long char columns warned about corruptions
> and left the altered table empty.
Could you please describe the problem a bit more accurately:
- what kind of fields exactly affected?
- do we really get empty *table* after ALTER (or some fields)?
- does it affect CHECK/REPAIR/OPTIMIZE (if yes, could you please add them to
the tast case?)?
> diff -Nrup a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c
> --- a/storage/myisam/mi_dynrec.c 2007-11-12 10:07:27 +01:00
> +++ b/storage/myisam/mi_dynrec.c 2007-12-18 15:19:02 +01:00
> @@ -1006,12 +1006,12 @@ uint _mi_rec_pack(MI_INFO *info, registe
> {
> if (rec->length > 255 && new_length > 127)
> {
> - to[0]=(char) ((new_length & 127)+128);
> - to[1]=(char) (new_length >> 7);
> + to[0]= (uchar) ((new_length & 127)+128);
as you're changing the line, please add spaces around '+'
> @@ -1128,12 +1128,14 @@ my_bool _mi_rec_check(MI_INFO *info,cons
> goto err;
> if (rec->length > 255 && new_length > 127)
> {
> - if (to[0] != (char) ((new_length & 127)+128) ||
> - to[1] != (char) (new_length >> 7))
> + /* purecov: begin inspected */
> + if (to[0] != (uchar) ((new_length & 127)+128) ||
the same
> - else if (*to++ != (char) new_length)
> + else if (*to++ != (uchar) new_length)
do we really need the type cast above (both are unsigned)?
Thanks,
Ramil.