Commit 0be3c555 authored by serg@serg.mylan's avatar serg@serg.mylan

mi_write: fix for ft2 when found word (in the tree) has different length as the word to insert

parent 38cae36c
...@@ -656,6 +656,14 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ...@@ -656,6 +656,14 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
if (chk_index_down(param,info,&info->s->ft2_keyinfo,record, if (chk_index_down(param,info,&info->s->ft2_keyinfo,record,
temp_buff,&tmp_keys,key_checksum,1)) temp_buff,&tmp_keys,key_checksum,1))
goto err; goto err;
if (tmp_keys + subkeys)
{
mi_check_print_error(param,"Number of words in the 2nd level tree "
"does not match the number in the header. "
"Parent word in on the page %s, offset %d",
llstr(page,llbuff), old_keypos-buff);
goto err;
}
(*keys)+=tmp_keys-1; (*keys)+=tmp_keys-1;
continue; continue;
} }
......
...@@ -372,6 +372,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, ...@@ -372,6 +372,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
/* popular word. two-level tree. going down */ /* popular word. two-level tree. going down */
my_off_t root=info->dupp_key_pos; my_off_t root=info->dupp_key_pos;
keyinfo=&info->s->ft2_keyinfo; keyinfo=&info->s->ft2_keyinfo;
get_key_full_length_rdonly(off, key);
key+=off; key+=off;
keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */ keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */
error=_mi_ck_real_write_btree(info, keyinfo, key, 0, error=_mi_ck_real_write_btree(info, keyinfo, key, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment