Commit ed355f59 authored by Igor Babaev's avatar Igor Babaev

MDEV-20407 mysqld got signal 11; rowid filter

If a joined table is accessed by a full text index then now no range rowid
filter can be used when accessing the records of this table.

This bug was fixed by the patch for mdev-20056.
This commit adds only a test case with a query using a full text index
and a range condition for another index.
parent 3eda03d0
......@@ -2321,3 +2321,37 @@ t1.id2 = t1.id);
1
DROP TABLE t1, t2, t3;
SET GLOBAL innodb_stats_persistent= @stats.save;
#
# MDEV-20407: usage of range filter is not supported when
# the joined table is accessed by a full text index
#
set @stats.save= @@innodb_stats_persistent;
set global innodb_stats_persistent=on;
create table t1(id int, s text, key (id), fulltext key (s)) engine=innodb;
insert into t1 values
(1119,'t'),(1134,'t'),(1134,'t'),(1143,'t'),(1143,'t'),(1187,'t'),(1187,'t'),
(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),
(1187,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),
(1214,'t'),(1214,'t'),(1215,'t'),(1215,'t'),(1215,'t'),(1216,'t'),(1218,'t'),
(1220,'t'),(1220,'t'),(1220,'t'),(1222,'t'),(1223,'t'),(1223,'t'),(1224,'t'),
(1225,'t'),(1225,'t'),(1226,'t'),(1226,'t'),(1227,'t'),(1227,'t'),(1228,'t'),
(1229,'t'),(1230,'t'),(1230,'t'),(1231,'t'),(1231,'t'),(1232,'t'),(1232,'t'),
(1232,'t'),(1232,'t'),(1233,'t'),(1241,'t'),(1245,'t'),(1247,'t'),(1247,'t'),
(1247,'t'),(1247,'t'),(1247,'t'),(1247,'t'),(1248,'like fttest');
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze Warning Engine-independent statistics are not collected for column 's'
test.t1 analyze status OK
explain extended select count(0) from t1
where id=15066 and (match s against ('+"fttest"' in boolean mode));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 fulltext id,s s 0 1 1.64 Using where
Warnings:
Note 1003 select count(0) AS `count(0)` from `test`.`t1` where `test`.`t1`.`id` = 15066 and (match `test`.`t1`.`s` against ('+"fttest"' in boolean mode))
select count(0) from t1
where id=15066 and (match s against ('+"fttest"' in boolean mode));
count(0)
0
drop table t1;
set global innodb_stats_persistent= @stats.save;
......@@ -182,3 +182,36 @@ eval $q2;
DROP TABLE t1, t2, t3;
SET GLOBAL innodb_stats_persistent= @stats.save;
--echo #
--echo # MDEV-20407: usage of range filter is not supported when
--echo # the joined table is accessed by a full text index
--echo #
set @stats.save= @@innodb_stats_persistent;
set global innodb_stats_persistent=on;
create table t1(id int, s text, key (id), fulltext key (s)) engine=innodb;
insert into t1 values
(1119,'t'),(1134,'t'),(1134,'t'),(1143,'t'),(1143,'t'),(1187,'t'),(1187,'t'),
(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),
(1187,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),
(1214,'t'),(1214,'t'),(1215,'t'),(1215,'t'),(1215,'t'),(1216,'t'),(1218,'t'),
(1220,'t'),(1220,'t'),(1220,'t'),(1222,'t'),(1223,'t'),(1223,'t'),(1224,'t'),
(1225,'t'),(1225,'t'),(1226,'t'),(1226,'t'),(1227,'t'),(1227,'t'),(1228,'t'),
(1229,'t'),(1230,'t'),(1230,'t'),(1231,'t'),(1231,'t'),(1232,'t'),(1232,'t'),
(1232,'t'),(1232,'t'),(1233,'t'),(1241,'t'),(1245,'t'),(1247,'t'),(1247,'t'),
(1247,'t'),(1247,'t'),(1247,'t'),(1247,'t'),(1248,'like fttest');
analyze table t1;
let $q=
select count(0) from t1
where id=15066 and (match s against ('+"fttest"' in boolean mode));
eval explain extended $q;
eval $q;
drop table t1;
set global innodb_stats_persistent= @stats.save;
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