diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-09-05 01:34:25 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-09-22 00:22:09 +0200 |
commit | fb324e3f8f7e81f60f19aa0840550acdcbbc429f (patch) | |
tree | dbb0d29b06c3c3f2b2b00b5574011a475f74f41e | |
parent | 7438667fa96433605078ada7874fc17eac925d9f (diff) | |
download | mariadb-git-fb324e3f8f7e81f60f19aa0840550acdcbbc429f.tar.gz |
MDEV-9137 MariaDB Crash on Query Using Aria Engine
fix for 2-level ft indexes and boolean search in Aria
-rw-r--r-- | mysql-test/suite/maria/fulltext2.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/maria/fulltext2.test | 2 | ||||
-rw-r--r-- | storage/maria/ma_ft_boolean_search.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/mysql-test/suite/maria/fulltext2.result b/mysql-test/suite/maria/fulltext2.result index f4e2e5dd5c9..9fa82451b8f 100644 --- a/mysql-test/suite/maria/fulltext2.result +++ b/mysql-test/suite/maria/fulltext2.result @@ -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; diff --git a/mysql-test/suite/maria/fulltext2.test b/mysql-test/suite/maria/fulltext2.test index 352ca405e99..8236eccd3af 100644 --- a/mysql-test/suite/maria/fulltext2.test +++ b/mysql-test/suite/maria/fulltext2.test @@ -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'); diff --git a/storage/maria/ma_ft_boolean_search.c b/storage/maria/ma_ft_boolean_search.c index 83ae08553ef..d4578ad6bd7 100644 --- a/storage/maria/ma_ft_boolean_search.c +++ b/storage/maria/ma_ft_boolean_search.c @@ -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, |