MDEV-12270 Port MySQL 8.0 Bug#21141390 REMOVE UNUSED FUNCTIONS AND CONVERT GLOBAL SYMBOLS TO STATIC

InnoDB defines some functions that are not called at all.
Other functions are called, but only from the same compilation unit.

Remove some function declarations and definitions, and add 'static'
keywords. Some symbols must be kept for separately compiled tools,
such as innochecksum.
This commit is contained in:
Marko Mäkelä 2015-05-26 10:01:12 +03:00 committed by Marko Mäkelä
commit 97acc4a1c3
78 changed files with 730 additions and 2912 deletions

View file

@ -232,30 +232,6 @@ fts_check_token(
bool is_ngram,
const CHARSET_INFO* cs);
/*******************************************************************//**
Tokenize a document. */
void
fts_tokenize_document(
/*==================*/
fts_doc_t* doc, /*!< in/out: document to
tokenize */
fts_doc_t* result, /*!< out: if provided, save
result tokens here */
st_mysql_ftparser* parser);/* in: plugin fts parser */
/*******************************************************************//**
Continue to tokenize a document. */
void
fts_tokenize_document_next(
/*=======================*/
fts_doc_t* doc, /*!< in/out: document to
tokenize */
ulint add_pos, /*!< in: add this position to all
tokens from this tokenization */
fts_doc_t* result, /*!< out: if provided, save
result tokens here */
st_mysql_ftparser* parser);/* in: plugin fts parser */
/******************************************************************//**
Initialize a document. */
void
@ -302,16 +278,6 @@ fts_index_fetch_nodes(
word, /*!< in: the word to fetch */
fts_fetch_t* fetch); /*!< in: fetch callback.*/
/******************************************************************//**
Create a fts_optimizer_word_t instance.
@return new instance */
fts_word_t*
fts_word_init(
/*==========*/
fts_word_t* word, /*!< in: word to initialize */
byte* utf8, /*!< in: UTF-8 string */
ulint len); /*!< in: length of string in bytes */
/******************************************************************//**
Compare two fts_trx_table_t instances, we actually compare the
table id's here.
@ -429,31 +395,7 @@ fts_config_set_index_value(
config table */
MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Increment the value in the config table for column name.
@return DB_SUCCESS or error code */
dberr_t
fts_config_increment_value(
/*=======================*/
trx_t* trx, /*!< transaction */
fts_table_t* fts_table, /*!< in: the indexed FTS table */
const char* name, /*!< in: increment config value
for this parameter name */
ulint delta) /*!< in: increment by this much */
MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Increment the per index value in the config table for column name.
@return DB_SUCCESS or error code */
dberr_t
fts_config_increment_index_value(
/*=============================*/
trx_t* trx, /*!< transaction */
dict_index_t* index, /*!< in: FTS index */
const char* name, /*!< in: increment config value
for this parameter name */
ulint delta); /*!< in: increment by this much */
#ifdef FTS_OPTIMIZE_DEBUG
/******************************************************************//**
Get an ulint value from the config table.
@return DB_SUCCESS or error code */
@ -465,6 +407,7 @@ fts_config_get_index_ulint(
const char* name, /*!< in: param name */
ulint* int_value) /*!< out: value */
MY_ATTRIBUTE((warn_unused_result));
#endif /* FTS_OPTIMIZE_DEBUG */
/******************************************************************//**
Set an ulint value int the config table.
@ -501,17 +444,6 @@ fts_cache_find_word(
text) /*!< in: word to search for */
MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Check cache for deleted doc id.
@return TRUE if deleted */
ibool
fts_cache_is_deleted_doc_id(
/*========================*/
const fts_cache_t*
cache, /*!< in: cache ito search */
doc_id_t doc_id) /*!< in: doc id to search for */
MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Append deleted doc ids to vector and sort the vector. */
void
@ -533,18 +465,6 @@ fts_wait_for_background_thread_to_start(
ulint max_wait); /*!< in: time in microseconds, if set
to 0 then it disables timeout
checking */
#ifdef FTS_DOC_STATS_DEBUG
/******************************************************************//**
Get the total number of words in the FTS for a particular FTS index.
@return DB_SUCCESS or error code */
dberr_t
fts_get_total_word_count(
/*=====================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: for this index */
ulint* total) /*!< out: total words */
MY_ATTRIBUTE((warn_unused_result));
#endif
/******************************************************************//**
Search the index specific cache for a particular FTS index.
@return the index specific cache else NULL */
@ -602,13 +522,6 @@ fts_optimize_add_table(
/*===================*/
dict_table_t* table); /*!< in: table to add */
/******************************************************************//**
Optimize a table. */
void
fts_optimize_do_table(
/*==================*/
dict_table_t* table); /*!< in: table to optimize */
/******************************************************************//**
Construct the prefix name of an FTS table.
@return own: table name, must be freed with ut_free() */