diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2022-07-20 14:14:43 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2022-08-03 20:35:12 +0530 |
commit | f9ec9b6abbce8c88b0cfd1888135b9701415162a (patch) | |
tree | 55dc490cb06a89e95f4fbfc140a2ed67ecb948fb /storage/innobase | |
parent | c2300d06f7845f51db6318c2fdcbadd6becc0e89 (diff) | |
download | mariadb-git-f9ec9b6abbce8c88b0cfd1888135b9701415162a.tar.gz |
MDEV-27282 InnoDB: Failing assertion: !query->intersection
- query->intersection fails to get freed if the query exceeds
innodb_ft_result_cache_limit
- errors from init_ftfuncs were not propogated by delete command
This is taken from percona/percona-server@ef2c0bcb9a34aeb06de0058d7c2a2969416b35a7
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/fts/fts0que.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc index 01227a8df58..f7fc543e211 100644 --- a/storage/innobase/fts/fts0que.cc +++ b/storage/innobase/fts/fts0que.cc @@ -1202,6 +1202,14 @@ fts_query_difference( return(query->error); } +/* Free the query intersection +@param query query instance */ +static void fts_query_free_intersection(fts_query_t* query) +{ + fts_query_free_doc_ids(query, query->intersection); + query->intersection = NULL; +} + /*****************************************************************//** Intersect the token doc ids with the current set. @return DB_SUCCESS if all go well */ @@ -1300,6 +1308,7 @@ fts_query_intersect( /* error is passed by 'query->error' */ if (query->error != DB_SUCCESS) { ut_ad(query->error == DB_FTS_EXCEED_RESULT_CACHE_LIMIT); + fts_query_free_intersection(query); return(query->error); } @@ -1328,6 +1337,8 @@ fts_query_intersect( ut_a(!query->multi_exist || (query->multi_exist && rbt_size(query->doc_ids) <= n_doc_ids)); + } else if (query->intersection) { + fts_query_free_intersection(query); } } @@ -1546,6 +1557,10 @@ fts_merge_doc_ids( query, ranking->doc_id, ranking->rank); if (query->error != DB_SUCCESS) { + if (query->intersection) { + ut_a(query->oper == FTS_EXIST); + fts_query_free_intersection(query); + } DBUG_RETURN(query->error); } |