Commit fb324e3f authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-9137 MariaDB Crash on Query Using Aria Engine

fix for 2-level ft indexes and boolean search in Aria
parent 7438667f
......@@ -18,5 +18,8 @@ test.t1 check status OK
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
count(*)
1024
insert t1 (a) values ('aaaxxx'),('aaayyy');
drop table t1;
......@@ -39,6 +39,8 @@ repair table t1;
check table t1;
repair table t1;
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
# mi_write:
insert t1 (a) values ('aaaxxx'),('aaayyy');
......
......@@ -457,7 +457,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
*/
ftbw->off=off;
ftbw->key_root= info->cur_row.lastpos;
ftbw->keyinfo=& info->s->ft2_keyinfo;
ftbw->keyinfo= info->last_key.keyinfo= & info->s->ft2_keyinfo;
r= _ma_search_first(info, ftbw->keyinfo, ftbw->key_root);
DBUG_ASSERT(r==0); /* found something */
memcpy(lastkey_buf+off, info->last_key.data,
......
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