diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-07-31 23:19:51 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-07-31 23:19:51 +0200 |
commit | ae6bdc6769646a09a8d4d08a42a69174ea677768 (patch) | |
tree | c80afdd0e3238dc5092fdcb1439f1390f9a9040b /storage/innobase/fts | |
parent | a49f5525bbe1bb1f4320bd0db066068a81af62d9 (diff) | |
parent | 7841a7eb09208f52fcbab7e80e38c7ca29b1339e (diff) | |
download | mariadb-git-ae6bdc6769646a09a8d4d08a42a69174ea677768.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'storage/innobase/fts')
-rw-r--r-- | storage/innobase/fts/fts0fts.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index bdc6660c0a6..c8ecf4d7d1f 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2021, Oracle and/or its affiliates. Copyright (c) 2016, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -1285,6 +1285,9 @@ fts_cache_node_add_positions( ptr = ilist + node->ilist_size; node->ilist_size_alloc = new_size; + if (cache) { + cache->total_size += new_size; + } } ptr_start = ptr; @@ -1311,6 +1314,9 @@ fts_cache_node_add_positions( if (node->ilist_size > 0) { memcpy(ilist, node->ilist, node->ilist_size); ut_free(node->ilist); + if (cache) { + cache->total_size -= node->ilist_size; + } } node->ilist = ilist; @@ -1318,10 +1324,6 @@ fts_cache_node_add_positions( node->ilist_size += enc_len; - if (cache) { - cache->total_size += enc_len; - } - if (node->first_doc_id == FTS_NULL_DOC_ID) { node->first_doc_id = doc_id; } |