/* Forward declarations */ class FTSQueryExecutor;
/** "NULL" value of a document id. */ #define FTS_NULL_DOC_ID 0
/** FTS hidden column that is used to map to and from the row */ static constexpr Lex_cstring FTS_DOC_ID= "FTS_DOC_ID"_LEX_CSTRING;
/** The name of the index created by FTS */ static constexpr Lex_cstring FTS_DOC_ID_INDEX= "FTS_DOC_ID_INDEX"_LEX_CSTRING;
/** Doc ID is a 8 byte value */ #define FTS_DOC_ID_LEN 8
/** The number of fields to sort when we build FT index with
FIC. Three fields are sort: (word, doc_id, position) */ #define FTS_NUM_FIELDS_SORT 3
/** Maximum number of rows in a table, smaller than which, we will
optimize using a 4 byte Doc ID for FIC merge sort to reduce sort size */ #define MAX_DOC_ID_OPT_VAL 1073741824
/** Document id type. */ typedef ib_id_t doc_id_t;
/** doc_id_t printf format */ #define FTS_DOC_ID_FORMAT IB_ID_FMT
/** Convert document id to the InnoDB (BIG ENDIAN) storage format. */ #define fts_write_doc_id(d, s) mach_write_to_8(d, s)
/** Read a document id to internal format. */ #define fts_read_doc_id(s) mach_read_from_8(s)
/** Bind the doc id to a variable */ #define fts_bind_doc_id(i, n, v) pars_info_bind_int8_literal(i, n, v)
/** Defines for FTS query mode, they have the same values as
those defined in mysql file ft_global.h */ #define FTS_NL 0 #define FTS_BOOL 1 #define FTS_SORTED 2 #define FTS_EXPAND 4 #define FTS_NO_RANKING 8 #define FTS_PROXIMITY 16 #define FTS_PHRASE 32 #define FTS_OPT_RANKING 64
/** The number of FTS index partitions for a fulltext index */ #define FTS_NUM_AUX_INDEX 6
/** Threshold where our optimize thread automatically kicks in */ #define FTS_OPTIMIZE_THRESHOLD 10000000
/** Maximum possible Fulltext word length in bytes (assuming mbmaxlen=4) */ #define FTS_MAX_WORD_LEN (HA_FT_MAXCHARLEN * 4)
/** Maximum possible Fulltext word length (in characters) */ #define FTS_MAX_WORD_LEN_IN_CHAR HA_FT_MAXCHARLEN
/** Number of columns in FTS AUX Tables */ #define FTS_DELETED_TABLE_NUM_COLS 1 #define FTS_CONFIG_TABLE_NUM_COLS 2 #define FTS_AUX_INDEX_TABLE_NUM_COLS 5
/** Variable specifying the number of word to optimize for each optimize table
call */ extern ulong fts_num_word_optimize;
/** FTS rank type, which will be between 0 .. 1 inclusive */ typedeffloat fts_rank_t;
/** Type of a row during a transaction. FTS_NOTHING means the row can be forgottenfromtheFTSsystem'sPOV,FTS_INVALIDisaninternalvalueused tomarkinvalidstates.
NOTE:Donotchangetheorderorvalueofthese,fts_trx_row_get_new_state
depends on them being exactly as they are. */ enum fts_row_state {
FTS_INSERT = 0,
FTS_MODIFY,
FTS_DELETE,
FTS_NOTHING,
FTS_INVALID
};
/** The FTS table types. */ enum fts_table_type_t {
FTS_INDEX_TABLE, /*!< FTS auxiliary table that is specifictoaparticularFTSindex
on a table */
FTS_COMMON_TABLE /*!< FTS auxiliary table that is common
for all FTS index on a table */
};
/** Information about changes in a single transaction affecting
the FTS system. */ struct fts_trx_t {
trx_t* trx; /*!< InnoDB transaction */
ib_vector_t* savepoints; /*!< Active savepoints, must have at leastoneelement,theimplied
savepoint */
ib_vector_t* last_stmt; /*!< last_stmt */
mem_heap_t* heap; /*!< heap */
};
/** Information required for transaction savepoint handling. */ struct fts_savepoint_t { constvoid* name; /*!< First entry is always NULL, the defaultinstance.Otherwisethe
savepoint */
ib_rbt_t* tables; /*!< Modified FTS tables */
};
/** Information about changed rows in a transaction for a single table. */ struct fts_trx_table_t {
dict_table_t* table; /*!< table */
fts_trx_t* fts_trx; /*!< link to parent */
ib_rbt_t* rows; /*!< rows changed; indexed by doc-id,
cells are fts_trx_row_t* */
fts_doc_ids_t* added_doc_ids; /*!< list of added doc ids (NULL until
the first addition) */
/*!< for adding doc ids */
que_t* docs_added_graph;
};
/** Information about one changed row in a transaction. */ struct fts_trx_row_t {
doc_id_t doc_id; /*!< Id of the ins/upd/del document */
fts_row_state state; /*!< state of the row */
ib_vector_t* fts_indexes; /*!< The indexes that are affected */
};
/** List of document ids that were added during a transaction. This listispassedontoabackground'Add'threadandOPTIMIZE,soit
needs its own memory heap. */ struct fts_doc_ids_t {
ib_vector_t* doc_ids; /*!< document ids (each element is
of type doc_id_t). */
ib_alloc_t* self_heap; /*!< Allocator used to create an instanceofthistypeandthe
doc_ids vector */
};
// FIXME: Get rid of this if possible. /** Since MySQL's character set support for Unicode is woefully inadequate (itsupportsbasicoperationslikeisalphaetc.onlyfor8-bitcharacters), wehavetoimplementourown.WeuseUTF-16withoutsurrogateprocessing
as our in-memory format. This typedef is a single such character. */ typedefunsignedshort ib_uc_t;
/** An UTF-16 ro UTF-8 string. */ struct fts_string_t {
byte* f_str; /*!< string, not necessary terminated in
any way */
ulint f_len; /*!< Length of the string in bytes */
ulint f_n_char; /*!< Number of characters */
};
byte* words; /*!< this contains the words thatwerequeried
and found in this document */
ulint words_len; /*!< words len */
};
/** Query result. */ struct fts_result_t {
ib_rbt_node_t* current; /*!< Current element */
ib_rbt_t* rankings_by_id; /*!< RB tree of type fts_ranking_t
indexed by doc id */
ib_rbt_t* rankings_by_rank;/*!< RB tree of type fts_ranking_t
indexed by rank */
};
/** This is used to generate the FTS auxiliary table name, we need the tableidandtheindexidtogeneratethecolumnspecificFTSauxiliary
table name. */ struct fts_table_t {
fts_table_type_t
type; /*!< The auxiliary table type */
table_id_t table_id; /*!< The table id */
index_id_t index_id; /*!< The index id */
constchar* suffix; /*!< The suffix of the fts auxiliary tablename,canbeNULL,notused
everywhere (yet) */ const dict_table_t*
table; /*!< Parent table */
CHARSET_INFO* charset; /*!< charset info if it is for FTS
index auxiliary table */
};
/** The state of the FTS sub system. */ class fts_t { public: /** fts_t constructor. @param[in]tabletablewithFTSindexes
@param[in,out] heap memory heap where 'this' is stored */
fts_t( const dict_table_t* table,
mem_heap_t* heap);
/** fts_t destructor. */
~fts_t();
/** Whether the ADDED table record sync-ed after crash recovery */ unsigned added_synced:1; /** Whether the table holds dict_sys.latch */ unsigned dict_locked:1;
/** Work queue for scheduling jobs for the FTS 'Add' thread, or NULL ifthethreadhasnotyetbeencreated.Eachworkitemisa
fts_trx_doc_ids_t*. */
ib_wqueue_t* add_wq;
/** FTS memory buffer for this table, or NULL if the table has no FTS
index. */
fts_cache_t* cache;
/** FTS doc id hidden column number in the CLUSTERED index. */
ulint doc_col;
/** Vector of FTS indexes, this is mainly for caching purposes. */
ib_vector_t* indexes;
/** Whether the table exists in fts_optimize_wq;
protected by fts_optimize_wq mutex */ bool in_queue;
/** Whether the sync message exists in fts_optimize_wq;
protected by fts_optimize_wq mutex */ bool sync_message;
/** Heap for fts_t allocation. */
mem_heap_t* fts_heap;
};
struct fts_stopword_t;
/** status bits for fts_stopword_t status field. */ #define STOPWORD_NOT_INIT 0x1 #define STOPWORD_OFF 0x2 #define STOPWORD_FROM_DEFAULT 0x4 #define STOPWORD_USER_TABLE 0x8
externconstchar* fts_default_stopword[];
/** Variable specifying the maximum FTS cache size for each table */ extern Atomic_relaxed<size_t> fts_max_cache_size;
/** Variable specifying the total memory allocated for FTS cache */ extern Atomic_relaxed<size_t> fts_max_total_cache_size;
/** Variable specifying the FTS result cache limit for each query */ extern size_t fts_result_cache_limit;
/** Variable specifying the maximum FTS max token size */ extern ulong fts_max_token_size;
/** Variable specifying the minimum FTS max token size */ extern ulong fts_min_token_size;
/** Whether the total memory used for FTS cache is exhausted, and we will
need a sync to free some memory */ externbool fts_need_sync;
/******************************************************************//**
Create a FTS cache. */
fts_cache_t*
fts_cache_create( /*=============*/
dict_table_t* table); /*!< table owns the FTS cache */
/******************************************************************//**
Create a FTS index cache.
@return Index Cache */
fts_index_cache_t*
fts_cache_index_cache_create( /*=========================*/
dict_table_t* table, /*!< in: table with FTS index */
dict_index_t* index); /*!< in: FTS index */
/******************************************************************//**
Get the next available document id. This function creates a new
transaction to generate the document id.
@return DB_SUCCESS if OK */
dberr_t
fts_get_next_doc_id( /*================*/ const dict_table_t* table, /*!< in: table */
doc_id_t* doc_id, /*!< out: new document id */
THD* thd); /*!< in: caller's THD (may be NULL
for background/recovery contexts) */
/******************************************************************//**
Create a new fts_doc_ids_t.
@returnnew fts_doc_ids_t. */
fts_doc_ids_t*
fts_doc_ids_create(void); /*=====================*/
/** Sort an array of doc_id */ void fts_doc_ids_sort(ib_vector_t *doc_ids);
/******************************************************************//**
Notify the FTS system about an operation on an FTS-indexed table. */ void
fts_trx_add_op( /*===========*/
trx_t* trx, /*!< in: InnoDB transaction */
dict_table_t* table, /*!< in: table */
doc_id_t doc_id, /*!< in: doc id */
fts_row_state state, /*!< in: state of the row */
ib_vector_t* fts_indexes); /*!< in: FTS indexes affected
(NULL=all) */
/******************************************************************//**
Free an FTS trx. */ void
fts_trx_free( /*=========*/
fts_trx_t* fts_trx); /*!< in, own: FTS trx */
/** Creates the common auxiliary tables needed for supporting an FTS index onthegiventable. Thefollowingtablesarecreated. CREATETABLE$FTS_PREFIX_DELETED (doc_idBIGINTUNSIGNED,UNIQUECLUSTEREDINDEXondoc_id) CREATETABLE$FTS_PREFIX_DELETED_CACHE (doc_idBIGINTUNSIGNED,UNIQUECLUSTEREDINDEXondoc_id) CREATETABLE$FTS_PREFIX_BEING_DELETED (doc_idBIGINTUNSIGNED,UNIQUECLUSTEREDINDEXondoc_id) CREATETABLE$FTS_PREFIX_BEING_DELETED_CACHE (doc_idBIGINTUNSIGNED,UNIQUECLUSTEREDINDEXondoc_id) CREATETABLE$FTS_PREFIX_CONFIG (keyCHAR(50),valueCHAR(200),UNIQUECLUSTEREDINDEXonkey) @param[in,out]trxtransaction @param[in]tabletablewithFTSindex @param[in]skip_doc_id_indexSkipindexondocid
@return DB_SUCCESS if succeed */
dberr_t
fts_create_common_tables(
trx_t* trx,
dict_table_t* table, bool skip_doc_id_index)
MY_ATTRIBUTE((nonnull, warn_unused_result)); /** Creates the column specific ancillary tables needed for supporting an FTSindexonthegiventable.
AllFTSAUXIndextableshavethefollowingschema. CREATTABLE$FTS_PREFIX_INDEX_[1-6]( wordVARCHAR(FTS_MAX_WORD_LEN), first_doc_idINTNOTNULL, last_doc_idUNSIGNEDNOTNULL, doc_countUNSIGNEDINTNOTNULL, ilistVARBINARYNOTNULL, UNIQUECLUSTEREDINDEXON(word,first_doc_id)) @param[in,out]trxdictionarytransaction @param[in]indexfulltextindex @param[in]idtableid
@return DB_SUCCESS or error code */
dberr_t
fts_create_index_tables(trx_t* trx, const dict_index_t* index, table_id_t id)
MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//**
Add the FTS document id hidden column. */ void
fts_add_doc_id_column( /*==================*/
dict_table_t* table, /*!< in/out: Table with FTS index */
mem_heap_t* heap); /*!< in: temporary memory heap, or NULL */
/** Lock the internal FTS_ tables for an index, before fts_drop_index_tables(). @paramtrxtransaction
@param index fulltext index */
dberr_t fts_lock_index_tables(trx_t *trx, const dict_index_t &index);
/** Lock the internal common FTS_ tables, before fts_drop_common_tables(). @paramtrxtransaction @paramtabletablecontainingFULLTEXTINDEX
@return DB_SUCCESS or error code */
dberr_t fts_lock_common_tables(trx_t *trx, const dict_table_t &table);
/** Lock the internal FTS_ tables for table, before fts_drop_tables(). @paramtrxtransaction @paramtabletablecontainingFULLTEXTINDEX
@return DB_SUCCESS or error code */
dberr_t fts_lock_tables(trx_t *trx, const dict_table_t &table);
/** Drop the internal FTS_ tables for table. @paramtrxtransaction @paramtabletablecontainingFULLTEXTINDEX
@return DB_SUCCESS or error code */
dberr_t fts_drop_tables(trx_t *trx, const dict_table_t &table);
/******************************************************************//**
The given transaction is about to be committed; do whatever is necessary
from the FTS system's POV.
@return DB_SUCCESS or error code */
dberr_t
fts_commit( /*=======*/
trx_t* trx) /*!< in: transaction */
MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Retrieve the FTS Relevance Ranking result for doc with doc_id
@return the relevance ranking value. */ float
fts_retrieve_ranking( /*=================*/
fts_result_t* result, /*!< in: FTS result structure */
doc_id_t doc_id); /*!< in: the interested document
doc_id */
/******************************************************************//**
FTS Query sort result, returned by fts_query() on fts_ranking_t::rank. */ void
fts_query_sort_result_on_rank( /*==========================*/
fts_result_t* result); /*!< out: result instance
to sort.*/
/******************************************************************//**
FTS Query free result, returned by fts_query(). */ void
fts_query_free_result( /*==================*/
fts_result_t* result); /*!< in: result instance
to free.*/
/******************************************************************//**
Extract the doc id from the FTS hidden column. */
doc_id_t
fts_get_doc_id_from_row( /*====================*/
dict_table_t* table, /*!< in: table */
dtuple_t* row); /*!< in: row whose FTS doc id we
want to extract.*/
/** Extract the doc id from the record that belongs to index. @param[in]recrecordcontainingFTS_DOC_ID @param[in]indexindexofrec @param[in]offsetsrec_get_offsets(rec,index)
@return doc id that was extracted from rec */
doc_id_t
fts_get_doc_id_from_rec( const rec_t* rec, const dict_index_t* index, const rec_offs* offsets);
/** Add new fts doc id to the update vector. @param[in]tablethetablethatcontainstheFTSindex. @param[in,out]ufieldtheftsdocidfieldintheupdatevector. Nonewmemoryisallocatedforthisinthis function. @param[in,out]next_doc_idtheftsdocidthathasbeenaddedtothe updatevector.If0,anewftsdocidis automaticallygenerated.Thememoryprovided forthisargumentwillbeusedbytheupdate vector.Ensurethatthelifetimeofthis memorymatchesthatoftheupdatevector. @param[in]thdCaller'sTHD;forwardedto fts_get_next_doc_id()whenanewid mustbeallocated
@return the fts doc id used in the update vector */
doc_id_t
fts_update_doc_id(
dict_table_t* table,
upd_field_t* ufield,
doc_id_t* next_doc_id,
THD* thd);
/******************************************************************//**
Create an instance of fts_t.
@return instance of fts_t */
fts_t*
fts_create( /*=======*/
dict_table_t* table); /*!< out: table with FTS
indexes */
/** Run OPTIMIZE on the given table. @paramtabletabletobeoptimized @paramthdthread
@return DB_SUCCESS if all ok */
dberr_t
fts_optimize_table(dict_table_t *table, THD *thd);
/** Startup the optimize task and create the work queue. */ void fts_optimize_init();
/****************************************************************//**
Drops index ancillary tables for a FTS index
@return DB_SUCCESS or error code */
dberr_t fts_drop_index_tables(trx_t *trx, const dict_index_t &index)
MY_ATTRIBUTE((warn_unused_result));
/** Add the table to add to the OPTIMIZER's list.
@param[in] table table to add */ void
fts_optimize_add_table(
dict_table_t* table);
/******************************************************************//**
Remove the table from the OPTIMIZER's list. We do wait for
acknowledgement from the consumer of the message. */ void
fts_optimize_remove_table( /*======================*/
dict_table_t* table); /*!< in: table to remove */
/*********************************************************************//**
Initialize things in cache. */ void
fts_cache_init( /*===========*/
fts_cache_t* cache); /*!< in: cache */
/*********************************************************************//**
Rollback to and including savepoint indentified by name. */ void
fts_savepoint_rollback( /*===================*/
trx_t* trx, /*!< in: transaction */ constvoid* name); /*!< in: savepoint */
/*********************************************************************//**
Rollback to and including savepoint indentified by name. */ void
fts_savepoint_rollback_last_stmt( /*=============================*/
trx_t* trx); /*!< in: transaction */
/** Run SYNC on the table, i.e., write out data from the cache to the FTSauxiliaryINDEXtableandclearthecacheattheend. @param[in,out]tableftstable @param[in]waitwhethertowaitforexistingsynctofinish @param[in]thdcaller'sthread
@return DB_SUCCESS on success, error code on failure. */
dberr_t fts_sync_table(dict_table_t* table, bool wait, THD* thd);
/****************************************************************//**
Create an FTS index cache. */
CHARSET_INFO*
fts_index_get_charset( /*==================*/
dict_index_t* index); /*!< in: FTS index */
/*********************************************************************//**
Get the initial Doc ID by consulting the CONFIG table.
On success, the resolved id is stored in *doc_id and the FTS cache's
first_doc_id is initialized. On failure (e.g. DB_INTERRUPTED when the
caller's thread is killed mid CONFIG-table read), *doc_id is set to 0 and the cache is left uninitialized so a later attempt can retry.
@return DB_SUCCESS or error code */
dberr_t
fts_init_doc_id( /*============*/ const dict_table_t* table, /*!< in: table */
THD* thd, /*!< in: caller's THD; may be NULL
if no connection THD is available */
doc_id_t* doc_id);/*!< out: initial Doc ID, or 0 on
failure */
/******************************************************************//**
compare two character string according to their charset. */ extern int
innobase_fts_text_cmp( /*==================*/ constvoid* cs, /*!< in: Character set */ constvoid* p1, /*!< in: key */ constvoid* p2); /*!< in: node */
/******************************************************************//**
compare two character string according to their charset. */ extern int
innobase_fts_text_cmp_prefix( /*=========================*/ constvoid* cs, /*!< in: Character set */ constvoid* p1, /*!< in: key */ constvoid* p2); /*!< in: node */
/*************************************************************//**
Get the next token from the given string and store it in *token. */ extern
ulint
innobase_mysql_fts_get_token( /*=========================*/
CHARSET_INFO* charset, /*!< in: Character set */ const byte* start, /*!< in: start of text */ const byte* end, /*!< in: one character past
end of text */
fts_string_t* token); /*!< out: token's text */
/*************************************************************//**
Get token char size by charset
@return the number of token char size */
ulint
fts_get_token_size( /*===============*/ const CHARSET_INFO* cs, /*!< in: Character set */ constchar* token, /*!< in: token */
ulint len); /*!< in: token length */
/*************************************************************//**
FULLTEXT tokenizer internal in MYSQL_FTPARSER_SIMPLE_MODE
@return0if tokenize sucessfully */ int
fts_tokenize_document_internal( /*===========================*/
MYSQL_FTPARSER_PARAM* param, /*!< in: parser parameter */ constchar* doc, /*!< in: document to tokenize */ int len); /*!< in: document length */
/*************************************************************//**
Get maximum Doc ID in a table if index "FTS_DOC_ID_INDEX" exists
@return max Doc ID or0if index "FTS_DOC_ID_INDEX" does not exist */
doc_id_t
fts_get_max_doc_id( /*===============*/
dict_table_t* table); /*!< in: user table */
/** Check whether a stopword table is in the right format. @paramstopword_table_nametablename @paramrow_endnameofthesystem-versioningendcolumn,or"value" @returnthestopwordcolumncharset
@retval NULL if the table does not exist or qualify */
CHARSET_INFO *fts_valid_stopword_table(constchar *stopword_table_name, constchar **row_end= NULL);
/** This function loads specified stopword into FTS cache @paramexecutorFTSQueryExecutorinstance @paramtabletablewhichhasftsindex
@return true if success */ bool fts_load_stopword(FTSQueryExecutor *executor, const dict_table_t *table) noexcept;
/** Read the rows from the fulltext index @paramexecutorFTSQueryExecutorinstance @paramtbl_nametablename @paramdoc_idscollectingdocids
@return DB_SUCCESS or error code */
dberr_t fts_table_fetch_doc_ids(FTSQueryExecutor *executor, constchar *tbl_name,
fts_doc_ids_t *doc_ids) noexcept;
/****************************************************************//** This function brings FTS index in sync when FTS index is first
used. There are documents that have not yet sync-ed to auxiliary
tables from last server abnormally shutdown, we will need to bring
such document into FTS cache before any further operations */ void
fts_init_index( /*===========*/
dict_table_t* table, /*!< in: Table with FTS */ bool has_cache_lock, /*!< in: Whether we already
have cache lock */
THD* thd); /*!< in: caller's THD; may be
NULL in recovery contexts */ /*******************************************************************//**
Add a newly create index in FTS cache */ void
fts_add_index( /*==========*/
dict_index_t* index, /*!< FTS index to be added */
dict_table_t* table); /*!< table */
/*******************************************************************//**
Drop auxiliary tables related to an FTS index
@return DB_SUCCESS or error number */
dberr_t
fts_drop_index( /*===========*/
dict_table_t* table, /*!< in: Table where indexes are dropped */
dict_index_t* index, /*!< in: Index to be dropped */
trx_t* trx); /*!< in: Transaction for the drop */
/****************************************************************//**
Rename auxiliary tables for all fts index for a table
@return DB_SUCCESS or error code */
dberr_t
fts_rename_aux_tables( /*==================*/
dict_table_t* table, /*!< in: user Table */ constchar* new_name, /*!< in: new table name */
trx_t* trx); /*!< in: transaction */
/*******************************************************************//**
Check indexes in the fts->indexes is also present in index cache and
table->indexes list
@returnTRUEif all indexes match */
ibool
fts_check_cached_index( /*===================*/
dict_table_t* table); /*!< in: Table where indexes are dropped */
/** Fetch the document from tuple, tokenize the text data and insertthetextdataintoftsauxiliarytableand itscache.Moreoverthistuplefieldsdoesn'tcontainanyinformation aboutexternallystoredfield.Thistuplecontainsdatadirectly convertedfrommysql. @param[in]fttFTStransactiontable @param[in]doc_iddocid @param[in]tupletuplefromwheredatacanberetrieved andtupleshouldbearrangedintable
schema order. */ void
fts_add_doc_from_tuple(
fts_trx_table_t*ftt,
doc_id_t doc_id, const dtuple_t* tuple);
/** Clear all fts resources when there is no internal DOC_ID andtherearenonewftsindextoadd.
@param[in,out] table table where fts is to be freed */ void fts_clear_all(dict_table_t *table);
/** Check whether the given name is fts auxiliary table andfetchtheparenttableidandindexid @param[in]nametablename @param[in,out]table_idparenttableid @param[in,out]index_idindexid
@return true if it is auxilary table */ bool fts_check_aux_table(constchar *name,
table_id_t *table_id,
index_id_t *index_id);
/** Update the last document id. This function could create a new transactiontoupdatethelastdocumentid. @paramexecutorqueryexecutor @paramtabletabletobeupdated @paramdoc_idlastdocumentid
@retval DB_SUCCESS if OK */
dberr_t
fts_update_sync_doc_id(FTSQueryExecutor *executor, const dict_table_t *table,
doc_id_t doc_id) noexcept;
/** Sync the table during commit phase @param[in]tabletabletobesynced
@param[in] thd caller's thread */ void fts_sync_during_ddl(dict_table_t* table, THD* thd);
/** Get a character set based on precise type. @paramprtypeprecisetype
@return the corresponding character set */
CHARSET_INFO* fts_get_charset(ulint prtype);
/** Load user defined stopword from designated user table @paramftsfulltextstructure @paramstopword_tablestopwordtable @paramstopword_infostopwordinformation
@return whether the operation is successful */ bool fts_load_user_stopword(FTSQueryExecutor *executor, fts_t *fts, constchar *stopword_table,
fts_stopword_t *stopword_info) noexcept;
/****************************************************************//** This function loads the default InnoDB stopword list */ void
fts_load_default_stopword( /*======================*/
fts_stopword_t* stopword_info); /*!< in: stopword info */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.20 Sekunden
(vorverarbeitet am 2026-10-08)
¤