diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 10:11:41 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 10:11:41 +0200 |
commit | 6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea (patch) | |
tree | b7c1a18b8bbc638ee12951d1d04db6d21bebcaed /storage/innobase/fts | |
parent | 07674e6a741a82d2e30f9798f699209a6c34dfef (diff) | |
parent | ec8882b9ddbba2f9fc3571a1ac2ade0dabf412d9 (diff) | |
download | mariadb-git-6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea.tar.gz |
Merge branch '10.5' into 10.6
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 885b0432ebf..c48eeeed48a 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 @@ -1279,6 +1279,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; @@ -1305,6 +1308,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; @@ -1312,10 +1318,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; } |