MDEV-17627 Assertion `inited==RND' failed in handler::ha_rnd_end() upon actions on partitioned table with FTS

use ha_ft_end() after ha_ft_init()
This commit is contained in:
Sergei Golubchik 2019-07-08 17:03:16 +02:00
parent 07b1a26c33
commit ee8477f9dc
3 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,6 @@
create table t1 (i int, f1 varchar(512), f2 varchar(512), fulltext (f1)) engine=myisam partition by hash (i);
select * from t1 where match (f1) against ('foo');
i f1 f2
select * from t1 where match (f2) against ('bar' in boolean mode) ;
i f1 f2
drop table t1;

View file

@ -0,0 +1,9 @@
--source include/have_partition.inc
#
# MDEV-17627 Assertion `inited==RND' failed in handler::ha_rnd_end() upon actions on partitioned table with FTS
#
create table t1 (i int, f1 varchar(512), f2 varchar(512), fulltext (f1)) engine=myisam partition by hash (i);
select * from t1 where match (f1) against ('foo');
select * from t1 where match (f2) against ('bar' in boolean mode) ;
drop table t1;

View file

@ -12499,6 +12499,9 @@ void JOIN_TAB::cleanup()
if (table)
{
table->file->ha_end_keyread();
if (type == JT_FT)
table->file->ha_ft_end();
else
table->file->ha_index_or_rnd_end();
preread_init_done= FALSE;
if (table->pos_in_table_list &&