summaryrefslogtreecommitdiff
path: root/storage/xtradb/include
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/include')
-rw-r--r--storage/xtradb/include/dict0dict.h12
-rw-r--r--storage/xtradb/include/fts0fts.h59
-rw-r--r--storage/xtradb/include/fts0priv.h14
3 files changed, 9 insertions, 76 deletions
diff --git a/storage/xtradb/include/dict0dict.h b/storage/xtradb/include/dict0dict.h
index dde8368a0ce..783578eb91c 100644
--- a/storage/xtradb/include/dict0dict.h
+++ b/storage/xtradb/include/dict0dict.h
@@ -1015,18 +1015,6 @@ dict_table_copy_types(
dtuple_t* tuple, /*!< in/out: data tuple */
const dict_table_t* table) /*!< in: table */
MY_ATTRIBUTE((nonnull));
-/********************************************************************
-Wait until all the background threads of the given table have exited, i.e.,
-bg_threads == 0. Note: bg_threads_mutex must be reserved when
-calling this. */
-UNIV_INTERN
-void
-dict_table_wait_for_bg_threads_to_exit(
-/*===================================*/
- dict_table_t* table, /* in: table */
- ulint delay) /* in: time in microseconds to wait between
- checks of bg_threads. */
- MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Looks for an index with the given id. NOTE that we do not reserve
the dictionary mutex: this function is for emergency purposes like
diff --git a/storage/xtradb/include/fts0fts.h b/storage/xtradb/include/fts0fts.h
index a1fab659732..9c70157a0c8 100644
--- a/storage/xtradb/include/fts0fts.h
+++ b/storage/xtradb/include/fts0fts.h
@@ -279,40 +279,21 @@ struct fts_table_t {
index auxiliary table */
};
-enum fts_status {
- BG_THREAD_STOP = 1, /*!< TRUE if the FTS background thread
- has finished reading the ADDED table,
- meaning more items can be added to
- the table. */
-
- BG_THREAD_READY = 2, /*!< TRUE if the FTS background thread
- is ready */
-
- ADD_THREAD_STARTED = 4, /*!< TRUE if the FTS add thread
- has started */
-
- ADDED_TABLE_SYNCED = 8, /*!< TRUE if the ADDED table record is
- sync-ed after crash recovery */
-
- TABLE_DICT_LOCKED = 16 /*!< Set if the table has
- dict_sys->mutex */
-};
-
-typedef enum fts_status fts_status_t;
-
/** The state of the FTS sub system. */
struct fts_t {
/*!< mutex protecting bg_threads* and
fts_add_wq. */
ib_mutex_t bg_threads_mutex;
- ulint bg_threads; /*!< number of background threads
- accessing this table */
-
- /*!< TRUE if background threads running
- should stop themselves */
- ulint fts_status; /*!< Status bit regarding fts
- running state */
+ /* Whether the table was added to fts_optimize_wq();
+ protected by bg_threads mutex */
+ unsigned in_queue:1;
+ /* Whether the ADDED table record sync-ed afer
+ crash recovery; protected by bg_threads mutex */
+ unsigned added_synced:1;
+ /* Whether the table hold dict_sys->mutex;
+ protected by bg_threads mutex */
+ unsigned dict_locked:1;
ib_wqueue_t* add_wq; /*!< Work queue for scheduling jobs
for the FTS 'Add' thread, or NULL
@@ -615,28 +596,6 @@ fts_startup(void);
/*==============*/
/******************************************************************//**
-Signal FTS threads to initiate shutdown. */
-UNIV_INTERN
-void
-fts_start_shutdown(
-/*===============*/
- dict_table_t* table, /*!< in: table with FTS
- indexes */
- fts_t* fts); /*!< in: fts instance to
- shutdown */
-
-/******************************************************************//**
-Wait for FTS threads to shutdown. */
-UNIV_INTERN
-void
-fts_shutdown(
-/*=========*/
- dict_table_t* table, /*!< in: table with FTS
- indexes */
- fts_t* fts); /*!< in: fts instance to
- shutdown */
-
-/******************************************************************//**
Create an instance of fts_t.
@return instance of fts_t */
UNIV_INTERN
diff --git a/storage/xtradb/include/fts0priv.h b/storage/xtradb/include/fts0priv.h
index 266534c9511..1622eaa07ae 100644
--- a/storage/xtradb/include/fts0priv.h
+++ b/storage/xtradb/include/fts0priv.h
@@ -521,20 +521,6 @@ fts_cache_append_deleted_doc_ids(
const fts_cache_t*
cache, /*!< in: cache to use */
ib_vector_t* vector); /*!< in: append to this vector */
-/******************************************************************//**
-Wait for the background thread to start. We poll to detect change
-of state, which is acceptable, since the wait should happen only
-once during startup.
-@return true if the thread started else FALSE (i.e timed out) */
-UNIV_INTERN
-ibool
-fts_wait_for_background_thread_to_start(
-/*====================================*/
- dict_table_t* table, /*!< in: table to which the thread
- is attached */
- 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.