From 89cc6338531d21469858325296d6ffa0c126ffd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 2 Aug 2021 16:39:08 +0300 Subject: MDEV-13564 fixup: Remove unused function fts_check_corrupt() The call to the function fts_check_corrupt() was removed in commit 09af00cbde1d62dfda574dee10e5c0fd240c3f7f already. --- storage/innobase/fts/fts0fts.cc | 55 -------------------------------------- storage/innobase/include/fts0fts.h | 12 +-------- 2 files changed, 1 insertion(+), 66 deletions(-) diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 6d1ac1b9300..ede9546713c 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -6337,58 +6337,3 @@ func_exit: return(TRUE); } - -/** Check if the all the auxillary tables associated with FTS index are in -consistent state. For now consistency is check only by ensuring -index->page_no != FIL_NULL -@param[out] base_table table has host fts index -@param[in,out] trx trx handler */ -void -fts_check_corrupt( - dict_table_t* base_table, - trx_t* trx) -{ - bool sane = true; - fts_table_t fts_table; - - /* Iterate over the common table and check for their sanity. */ - FTS_INIT_FTS_TABLE(&fts_table, NULL, FTS_COMMON_TABLE, base_table); - - for (ulint i = 0; fts_common_tables[i] != NULL && sane; ++i) { - - char table_name[MAX_FULL_NAME_LEN]; - - fts_table.suffix = fts_common_tables[i]; - fts_get_table_name(&fts_table, table_name); - - dict_table_t* aux_table = dict_table_open_on_name( - table_name, true, FALSE, DICT_ERR_IGNORE_NONE); - - if (aux_table == NULL) { - dict_set_corrupted( - dict_table_get_first_index(base_table), - trx, "FTS_SANITY_CHECK"); - ut_ad(base_table->corrupted == TRUE); - sane = false; - continue; - } - - for (dict_index_t* aux_table_index = - UT_LIST_GET_FIRST(aux_table->indexes); - aux_table_index != NULL; - aux_table_index = - UT_LIST_GET_NEXT(indexes, aux_table_index)) { - - /* Check if auxillary table needed for FTS is sane. */ - if (aux_table_index->page == FIL_NULL) { - dict_set_corrupted( - dict_table_get_first_index(base_table), - trx, "FTS_SANITY_CHECK"); - ut_ad(base_table->corrupted == TRUE); - sane = false; - } - } - - dict_table_close(aux_table, FALSE, FALSE); - } -} diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h index faa169d33c5..834a2bc9407 100644 --- a/storage/innobase/include/fts0fts.h +++ b/storage/innobase/include/fts0fts.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, 2020, MariaDB Corporation. +Copyright (c) 2016, 2021, 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 @@ -929,16 +929,6 @@ fts_check_cached_index( /*===================*/ dict_table_t* table); /*!< in: Table where indexes are dropped */ -/** Check if the all the auxillary tables associated with FTS index are in -consistent state. For now consistency is check only by ensuring -index->page_no != FIL_NULL -@param[out] base_table table has host fts index -@param[in,out] trx trx handler */ -void -fts_check_corrupt( - dict_table_t* base_table, - trx_t* trx); - /** Fetch the document from tuple, tokenize the text data and insert the text data into fts auxiliary table and its cache. Moreover this tuple fields doesn't contain any information -- cgit v1.2.1