summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-05-23 14:01:52 +0200
committerserg@serg.mylan <>2004-05-23 14:01:52 +0200
commit41f4f0317fe6aa3ccbcbf57042e4eab7bbaa0fc6 (patch)
tree3229e90ec073567e299a4726e7374397ba9c7d8f /myisam
parente21e41fce803403239eab7255f6a0e3dcccc8e45 (diff)
downloadmariadb-git-41f4f0317fe6aa3ccbcbf57042e4eab7bbaa0fc6.tar.gz
bug in repair_by_sort of fulltext indexes that contained identical
(as of mi_compare_text) words with different lengths. bug #3835
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index d25ffeedff0..5f20046d1cf 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -3311,8 +3311,7 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a)
}
get_key_full_length_rdonly(val_off, ft_buf->lastkey);
- if (val_off == a_len &&
- mi_compare_text(sort_param->seg->charset,
+ if (mi_compare_text(sort_param->seg->charset,
((uchar *)a)+1,a_len-1,
ft_buf->lastkey+1,val_off-1, 0, 0)==0)
{
@@ -3320,11 +3319,11 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a)
{
ft_buf->count++;
return sort_insert_key(sort_param,key_block,
- ((uchar *)a)+val_off, HA_OFFSET_ERROR);
+ ((uchar *)a)+a_len, HA_OFFSET_ERROR);
}
/* storing the key in the buffer. */
- memcpy (ft_buf->buf, (char *)a+val_off, val_len);
+ memcpy (ft_buf->buf, (char *)a+a_len, val_len);
ft_buf->buf+=val_len;
if (ft_buf->buf < ft_buf->end)
return 0;