diff options
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r-- | myisam/mi_check.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 3c1d090f53d..d72a38d336c 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -2495,6 +2495,10 @@ static int sort_key_read(MI_SORT_PARAM *sort_param, void *key) (info->s->rec_reflength+ _mi_make_key(info, sort_param->key, (uchar*) key, sort_param->record, sort_param->filepos)); +#ifdef HAVE_purify + bzero(key+sort_param->real_key_length, + (sort_param->key_length-sort_param->real_key_length)); +#endif DBUG_RETURN(sort_write_record(sort_param)); } /* sort_key_read */ @@ -2528,8 +2532,14 @@ static int sort_ft_key_read(MI_SORT_PARAM *sort_param, void *key) wptr=(FT_WORD*)(sort_param->wordptr); } - sort_param->real_key_length=info->s->rec_reflength+_ft_make_key(info, - sort_param->key,key,wptr++,sort_param->filepos); + sort_param->real_key_length=(info->s->rec_reflength+ + _ft_make_key(info, sort_param->key, + key, wptr++, sort_param->filepos)); +#ifdef HAVE_purify + if (sort_param->key_length > sort_param->real_key_length) + bzero(key+sort_param->real_key_length, + (sort_param->key_length-sort_param->real_key_length)); +#endif if (!wptr->pos) { my_free((char*) sort_param->wordlist, MYF(0)); @@ -2538,10 +2548,10 @@ static int sort_ft_key_read(MI_SORT_PARAM *sort_param, void *key) else sort_param->wordptr=(void*)wptr; - DBUG_RETURN(error); } /* sort_ft_key_read */ + /* Read next record from file using parameters in sort_info */ /* Return -1 if end of file, 0 if ok and > 0 if error */ |