summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/dict0dict.h11
-rw-r--r--storage/innobase/include/fts0fts.h57
-rw-r--r--storage/innobase/include/fts0priv.h13
-rw-r--r--storage/innobase/include/row0ins.h22
4 files changed, 15 insertions, 88 deletions
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 12a566a27c6..8d12cccec32 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -1040,17 +1040,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. */
-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/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h
index b38658f281e..30655b3934e 100644
--- a/storage/innobase/include/fts0fts.h
+++ b/storage/innobase/include/fts0fts.h
@@ -304,27 +304,6 @@ 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. */
class fts_t {
public:
@@ -341,13 +320,19 @@ public:
/** Mutex protecting bg_threads* and fts_add_wq. */
ib_mutex_t bg_threads_mutex;
+ /** 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 after
+ crash recovery; protected by bg_threads_mutex */
+ unsigned added_synced:1;
+ /** Whether the table holds dict_sys->mutex;
+ protected by bg_threads_mutex */
+ unsigned dict_locked:1;
+
/** Number of background threads accessing this table. */
ulint bg_threads;
- /** Status bit regarding fts running state. TRUE if background
- threads running should stop themselves. */
- ulint fts_status;
-
/** Work queue for scheduling jobs for the FTS 'Add' thread, or NULL
if the thread has not yet been created. Each work item is a
fts_trx_doc_ids_t*. */
@@ -634,28 +619,6 @@ void
fts_startup(void);
/*==============*/
-#if 0 // TODO: Enable this in WL#6608
-/******************************************************************//**
-Signal FTS threads to initiate shutdown. */
-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. */
-void
-fts_shutdown(
-/*=========*/
- dict_table_t* table, /*!< in: table with FTS
- indexes */
- fts_t* fts); /*!< in: fts instance to
- shutdown */
-#endif
-
/******************************************************************//**
Create an instance of fts_t.
@return instance of fts_t */
diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h
index 40978ea3f1c..9a767378103 100644
--- a/storage/innobase/include/fts0priv.h
+++ b/storage/innobase/include/fts0priv.h
@@ -442,19 +442,6 @@ fts_cache_append_deleted_doc_ids(
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) */
-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 */
-/******************************************************************//**
Search the index specific cache for a particular FTS index.
@return the index specific cache else NULL */
fts_index_cache_t*
diff --git a/storage/innobase/include/row0ins.h b/storage/innobase/include/row0ins.h
index 82bb3c91171..ddc3db8c694 100644
--- a/storage/innobase/include/row0ins.h
+++ b/storage/innobase/include/row0ins.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -92,10 +92,7 @@ row_ins_clust_index_entry_low(
ulint n_uniq, /*!< in: 0 or index->n_uniq */
dtuple_t* entry, /*!< in/out: index entry to insert */
ulint n_ext, /*!< in: number of externally stored columns */
- que_thr_t* thr, /*!< in: query thread or NULL */
- bool dup_chk_only)
- /*!< in: if true, just do duplicate check
- and return. don't execute actual insert. */
+ que_thr_t* thr) /*!< in: query thread or NULL */
MY_ATTRIBUTE((warn_unused_result));
/***************************************************************//**
@@ -120,10 +117,7 @@ row_ins_sec_index_entry_low(
dtuple_t* entry, /*!< in/out: index entry to insert */
trx_id_t trx_id, /*!< in: PAGE_MAX_TRX_ID during
row_log_table_apply(), or 0 */
- que_thr_t* thr, /*!< in: query thread */
- bool dup_chk_only)
- /*!< in: if true, just do duplicate check
- and return. don't execute actual insert. */
+ que_thr_t* thr) /*!< in: query thread */
MY_ATTRIBUTE((warn_unused_result));
/***************************************************************//**
@@ -138,10 +132,7 @@ row_ins_clust_index_entry(
dict_index_t* index, /*!< in: clustered index */
dtuple_t* entry, /*!< in/out: index entry to insert */
que_thr_t* thr, /*!< in: query thread */
- ulint n_ext, /*!< in: number of externally stored columns */
- bool dup_chk_only)
- /*!< in: if true, just do duplicate check
- and return. don't execute actual insert. */
+ ulint n_ext) /*!< in: number of externally stored columns */
MY_ATTRIBUTE((warn_unused_result));
/***************************************************************//**
Inserts an entry into a secondary index. Tries first optimistic,
@@ -154,10 +145,7 @@ row_ins_sec_index_entry(
/*====================*/
dict_index_t* index, /*!< in: secondary index */
dtuple_t* entry, /*!< in/out: index entry to insert */
- que_thr_t* thr, /*!< in: query thread */
- bool dup_chk_only)
- /*!< in: if true, just do duplicate check
- and return. don't execute actual insert. */
+ que_thr_t* thr) /*!< in: query thread */
MY_ATTRIBUTE((warn_unused_result));
/***********************************************************//**
Inserts a row to a table. This is a high-level function used in