[Commits] 05b2a30: MDEV-20407 mysqld got signal 11; rowid filter

IgorBabaev igor at mariadb.com
Tue Nov 26 21:22:51 EET 2019


revision-id: 05b2a309e6932ee2f4198d8082373887157ad16c (mariadb-10.4.10-31-g05b2a30)
parent(s): 4d4b2867a2526872a7b476a5c3577be695800a8e
author: Igor Babaev
committer: Igor Babaev
timestamp: 2019-11-26 11:22:51 -0800
message:

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.

---
 mysql-test/main/rowid_filter_innodb.result | 34 ++++++++++++++++++++++++++++++
 mysql-test/main/rowid_filter_innodb.test   | 33 +++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result
index eaad4ef..2f57ee0 100644
--- a/mysql-test/main/rowid_filter_innodb.result
+++ b/mysql-test/main/rowid_filter_innodb.result
@@ -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;
diff --git a/mysql-test/main/rowid_filter_innodb.test b/mysql-test/main/rowid_filter_innodb.test
index cfca162..f1b7b0d 100644
--- a/mysql-test/main/rowid_filter_innodb.test
+++ b/mysql-test/main/rowid_filter_innodb.test
@@ -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;


More information about the commits mailing list