diff options
author | Sachin Agarwal <sachin.z.agarwal@oracle.com> | 2020-08-28 18:18:25 +0530 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-26 13:32:30 +0200 |
commit | 1ff8588c3f1f07e7f6e1b00fb5f485488324cc0a (patch) | |
tree | 10c67df9ddfa67fed6fd670060a3aeb84899a267 /sql/sql_admin.h | |
parent | e391417f0fdbd746e23808b3d15d6cbe5a3b0aac (diff) | |
download | mariadb-git-bb-10.2-MDEV-23989.tar.gz |
Bug #31228694 FTS QUERY WITH LIMIT HIT AN ASSERTbb-10.2-MDEV-23989
Problem:
1. The server terminates abnormally when phrase search doesn't
filter out doc_ids correctly. This problem has been fixed in bug
2. Wrong query result: It's a regression from the bug #22709692 fix.
This fix optimize full-text search query with limit clause.
when FTS expression involves only union operation, we fetch only
number of doc_ids specified with the limit clause.
Fulltext phrase search is not an union operation and we consider
phrase search with plugin parser a union operation.
In phrase search with limit clause, we fetch limited doc_ids for
each token and if any of the selected doc_id does not contain all
tokens in correct order then we do not include that row_id in the
result set.
Therefore phrase search gets fewer number of rows than the qualified
rows exist in the table.
Fix:
Added a condition that phrase search with plugin parser is not a
union operation.
RB: 24925
Reviewed by : Annamalai Gurusami <annamalai.gurusami@oracle.com>
This is a cherry-pick of
mysql/mysql-server@5549920b7a33ef33034461d973a9ecb17ce49799
without a test case, because the test case depends on an n-gram
tokenizer that will be missing from MariaDB until MDEV-10267 is added.
Diffstat (limited to 'sql/sql_admin.h')
0 files changed, 0 insertions, 0 deletions