From d2900d917f1f3e98c87d21f35a5ea12cd0fa2c05 Mon Sep 17 00:00:00 2001 From: Yury Kurlykov Date: Wed, 20 May 2020 17:10:07 +1000 Subject: MDEV-22629 Remove fts_indexes field from struct fts_update_t (#1537) fts_indexes field in fts_update_t never used. So replace fts_update_t with doc_id_t in the code --- storage/innobase/include/fts0priv.h | 2 +- storage/innobase/include/fts0types.h | 21 +++------------------ storage/innobase/include/fts0types.ic | 11 +++++------ 3 files changed, 9 insertions(+), 25 deletions(-) (limited to 'storage/innobase/include') diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h index dd724aa12d4..4c8746c053f 100644 --- a/storage/innobase/include/fts0priv.h +++ b/storage/innobase/include/fts0priv.h @@ -239,7 +239,7 @@ Do a binary search for a doc id in the array int fts_bsearch( /*========*/ - fts_update_t* array, /*!< in: array to sort */ + doc_id_t* array, /*!< in: array to sort */ int lower, /*!< in: lower bound of array*/ int upper, /*!< in: upper bound of array*/ doc_id_t doc_id) /*!< in: doc id to lookup */ diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h index a08a60b9e95..44c3ab77695 100644 --- a/storage/innobase/include/fts0types.h +++ b/storage/innobase/include/fts0types.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2019, MariaDB Corporation. +Copyright (c) 2017, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -80,20 +80,6 @@ struct fts_index_cache_t { CHARSET_INFO* charset; /*!< charset */ }; -/** For supporting the tracking of updates on multiple FTS indexes we need -to track which FTS indexes need to be updated. For INSERT and DELETE we -update all fts indexes. */ -struct fts_update_t { - doc_id_t doc_id; /*!< The doc id affected */ - - ib_vector_t* fts_indexes; /*!< The FTS indexes that need to be - updated. A NULL value means all - indexes need to be updated. This - vector is not allocated on the heap - and so must be freed explicitly, - when we are done with it */ -}; - /** Stop word control infotmation. */ struct fts_stopword_t { ulint status; /*!< Status of the stopword tree */ @@ -319,10 +305,9 @@ fts_ranking_doc_id_cmp( const void* p2); /*!< in: id2 */ /******************************************************************//** -Compare two fts_update_t instances doc_ids. */ +Compare two doc_ids. */ UNIV_INLINE -int -fts_update_doc_id_cmp( +int fts_doc_id_cmp( /*==================*/ /*!< out: < 0 if n1 < n2, diff --git a/storage/innobase/include/fts0types.ic b/storage/innobase/include/fts0types.ic index e388d6257f6..cf5cf35c48e 100644 --- a/storage/innobase/include/fts0types.ic +++ b/storage/innobase/include/fts0types.ic @@ -79,19 +79,18 @@ fts_ranking_doc_id_cmp( } /******************************************************************//** -Compare two fts_update_t doc_ids. +Compare two doc_ids. @return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */ UNIV_INLINE -int -fts_update_doc_id_cmp( +int fts_doc_id_cmp( /*==================*/ const void* p1, /*!< in: id1 */ const void* p2) /*!< in: id2 */ { - const fts_update_t* up1 = (const fts_update_t*) p1; - const fts_update_t* up2 = (const fts_update_t*) p2; + const doc_id_t* up1 = static_cast(p1); + const doc_id_t* up2 = static_cast(p2); - return((int)(up1->doc_id - up2->doc_id)); + return static_cast(*up1 - *up2); } /******************************************************************//** -- cgit v1.2.1