MySQL 9.0.0
Source Code Documentation
fts0priv.h File Reference

Full text search internal header file. More...

#include "dict0dict.h"
#include "fts0types.h"
#include "pars0pars.h"
#include "que0que.h"
#include "que0types.h"
#include "univ.i"
#include "fts0priv.ic"

Go to the source code of this file.

Macros

#define FTS_BACKGROUND_THREAD_WAIT_COUNT   1000
 Maximum number of iterations to wait before we complain. More...
 
#define FTS_MAX_CONFIG_NAME_LEN   64
 The maximum length of the config table's value column in bytes. More...
 
#define FTS_MAX_CONFIG_VALUE_LEN   1024
 The maximum length of the config table's value column in bytes. More...
 
#define FTS_ILIST_MAX_SIZE   (64 * 1024)
 Approx. More...
 
#define FTS_OPTIMIZE_LIMIT_IN_SECS   "optimize_checkpoint_limit"
 FTS config table name parameters. More...
 
#define FTS_SYNCED_DOC_ID   "synced_doc_id"
 The next doc id. More...
 
#define FTS_LAST_OPTIMIZED_WORD   "last_optimized_word"
 The last word that was OPTIMIZED. More...
 
#define FTS_TOTAL_DELETED_COUNT   "deleted_doc_count"
 Total number of documents that have been deleted. More...
 
#define FTS_TOTAL_WORD_COUNT   "total_word_count"
 Total number of words parsed from all documents. More...
 
#define FTS_OPTIMIZE_START_TIME   "optimize_start_time"
 Start of optimize of an FTS index. More...
 
#define FTS_OPTIMIZE_END_TIME   "optimize_end_time"
 End of optimize for an FTS index. More...
 
#define FTS_STOPWORD_TABLE_NAME   "stopword_table_name"
 User specified stopword table name. More...
 
#define FTS_USE_STOPWORD   "use_stopword"
 Whether to use (turn on/off) stopword. More...
 
#define FTS_TABLE_STATE   "table_state"
 State of the FTS system for this table. More...
 
#define FTS_AUX_MIN_TABLE_ID_LENGTH   48
 The minimum length of an FTS auxiliary table names's id component e.g., For an auxiliary table name. More...
 
#define FTS_MAX_INT_LEN   32
 Maximum length of an integer stored in the config table value column. More...
 
#define FTS_FETCH_DOC_BY_ID_EQUAL   1
 define for fts_doc_fetch_by_doc_id() "option" value, defines whether we want to get Doc whose ID is equal to or greater or smaller than supplied ID More...
 
#define FTS_FETCH_DOC_BY_ID_LARGE   2
 

Typedefs

typedef enum fts_table_state_enum fts_table_state_t
 

Enumerations

enum  fts_table_state_enum { FTS_TABLE_STATE_RUNNING = 0 , FTS_TABLE_STATE_OPTIMIZING , FTS_TABLE_STATE_DELETED }
 

Functions

que_tfts_parse_sql (fts_table_t *fts_table, pars_info_t *info, const char *sql)
 Parse an SQL string. More...
 
dberr_t fts_eval_sql (trx_t *trx, que_t *graph)
 Evaluate a parsed SQL statement. More...
 
void fts_get_table_name (const fts_table_t *fts_table, char *table_name)
 Construct the name of an ancillary FTS table for the given table. More...
 
void fts_get_table_name_5_7 (const fts_table_t *fts_table, char *table_name)
 Construct the name of an ancillary FTS table for the given table in 5.7 compatible format. More...
 
const char * fts_get_select_columns_str (dict_index_t *index, pars_info_t *info, mem_heap_t *heap)
 Construct the column specification part of the SQL string for selecting the indexed FTS columns for the given table. More...
 
dberr_t fts_doc_fetch_by_doc_id (fts_get_doc_t *get_doc, doc_id_t doc_id, dict_index_t *index_to_use, ulint option, fts_sql_callback callback, void *arg)
 Fetch document (= a single row's indexed text) with the given document id. More...
 
bool fts_query_expansion_fetch_doc (void *row, void *user_arg)
 Callback function for fetch that stores the text of an FTS document, converting each column to UTF-16. More...
 
dberr_t fts_write_node (trx_t *trx, que_t **graph, fts_table_t *fts_table, fts_string_t *word, fts_node_t *node)
 in: node columns More...
 
bool fts_check_token (const fts_string_t *token, const ib_rbt_t *stopwords, bool is_ngram, const CHARSET_INFO *cs)
 Check fts token. More...
 
void fts_doc_init (fts_doc_t *doc)
 Initialize a document. More...
 
int fts_bsearch (fts_update_t *array, int lower, int upper, doc_id_t doc_id)
 Do a binary search for a doc id in the array. More...
 
void fts_doc_free (fts_doc_t *doc)
 Free document. More...
 
void fts_word_free (fts_word_t *word)
 Free fts_optimizer_word_t instanace. More...
 
dberr_t fts_index_fetch_nodes (trx_t *trx, que_t **graph, fts_table_t *fts_table, const fts_string_t *word, fts_fetch_t *fetch)
 Read the rows from the FTS inde. More...
 
static int fts_trx_table_cmp (const void *v1, const void *v2)
 Compare two fts_trx_table_t instances, we actually compare the table id's here. More...
 
static int fts_trx_table_id_cmp (const void *p1, const void *p2)
 Compare a table id with a trx_table_t table id. More...
 
dberr_t fts_sql_commit (trx_t *trx)
 Commit a transaction. More...
 
dberr_t fts_sql_rollback (trx_t *trx)
 Rollback a transaction. More...
 
dberr_t fts_config_get_value (trx_t *trx, fts_table_t *fts_table, const char *name, fts_string_t *value)
 Get value from config table. More...
 
dberr_t fts_config_get_index_value (trx_t *trx, dict_index_t *index, const char *param, fts_string_t *value)
 Get value specific to an FTS index from the config table. More...
 
dberr_t fts_config_set_value (trx_t *trx, fts_table_t *fts_table, const char *name, const fts_string_t *value)
 Set the value in the config table for name. More...
 
dberr_t fts_config_set_ulint (trx_t *trx, fts_table_t *fts_table, const char *name, ulint int_value)
 Set an ulint value in the config table. More...
 
dberr_t fts_config_set_index_value (trx_t *trx, dict_index_t *index, const char *param, fts_string_t *value)
 Set the value specific to an FTS index in the config table. More...
 
dberr_t fts_config_get_ulint (trx_t *trx, fts_table_t *fts_table, const char *name, ulint *int_value)
 Get an ulint value from the config table. More...
 
const ib_vector_tfts_cache_find_word (const fts_index_cache_t *index_cache, const fts_string_t *text)
 Search cache for word. More...
 
void fts_cache_append_deleted_doc_ids (const fts_cache_t *cache, ib_vector_t *vector)
 Append deleted doc ids to vector and sort the vector. More...
 
bool fts_wait_for_background_thread_to_start (dict_table_t *table, std::chrono::microseconds max_wait)
 Wait for the background thread to start. More...
 
fts_index_cache_tfts_find_index_cache (const fts_cache_t *cache, const dict_index_t *index)
 Search the index specific cache for a particular FTS index. More...
 
static int fts_write_object_id (ib_id_t id, char *str)
 Write the table id to the given buffer (including final NUL). More...
 
static bool fts_read_object_id (ib_id_t *id, const char *str)
 Read the table id from the string generated by fts_write_object_id(). More...
 
int fts_get_table_id (const fts_table_t *fts_table, char *table_id)
 Get the table id. More...
 
void fts_optimize_add_table (dict_table_t *table)
 Add the table to add to the OPTIMIZER's list. More...
 
char * fts_get_table_name_prefix (const fts_table_t *fts_table)
 Construct the prefix name of an FTS table. More...
 
void fts_cache_node_add_positions (fts_cache_t *cache, fts_node_t *node, doc_id_t doc_id, ib_vector_t *positions)
 Add node positions. More...
 
char * fts_config_create_index_param_name (const char *param, const dict_index_t *index)
 Create the config table name for retrieving index specific value. More...
 

Variables

constexpr std::chrono::milliseconds FTS_MAX_BACKGROUND_THREAD_WAIT {10}
 The default time to wait for the background thread. More...
 

Detailed Description

Full text search internal header file.

Created 2011/09/02 Sunny Bains

Macro Definition Documentation

◆ FTS_AUX_MIN_TABLE_ID_LENGTH

#define FTS_AUX_MIN_TABLE_ID_LENGTH   48

The minimum length of an FTS auxiliary table names's id component e.g., For an auxiliary table name.

    "FTS_@<TABLE_ID@>_SUFFIX"

This constant is for the minimum length required to store the <TABLE_ID> component.

◆ FTS_BACKGROUND_THREAD_WAIT_COUNT

#define FTS_BACKGROUND_THREAD_WAIT_COUNT   1000

Maximum number of iterations to wait before we complain.

◆ FTS_FETCH_DOC_BY_ID_EQUAL

#define FTS_FETCH_DOC_BY_ID_EQUAL   1

define for fts_doc_fetch_by_doc_id() "option" value, defines whether we want to get Doc whose ID is equal to or greater or smaller than supplied ID

◆ FTS_FETCH_DOC_BY_ID_LARGE

#define FTS_FETCH_DOC_BY_ID_LARGE   2

◆ FTS_ILIST_MAX_SIZE

#define FTS_ILIST_MAX_SIZE   (64 * 1024)

Approx.

upper limit of ilist length in bytes.

◆ FTS_LAST_OPTIMIZED_WORD

#define FTS_LAST_OPTIMIZED_WORD   "last_optimized_word"

The last word that was OPTIMIZED.

◆ FTS_MAX_CONFIG_NAME_LEN

#define FTS_MAX_CONFIG_NAME_LEN   64

The maximum length of the config table's value column in bytes.

◆ FTS_MAX_CONFIG_VALUE_LEN

#define FTS_MAX_CONFIG_VALUE_LEN   1024

The maximum length of the config table's value column in bytes.

◆ FTS_MAX_INT_LEN

#define FTS_MAX_INT_LEN   32

Maximum length of an integer stored in the config table value column.

◆ FTS_OPTIMIZE_END_TIME

#define FTS_OPTIMIZE_END_TIME   "optimize_end_time"

End of optimize for an FTS index.

◆ FTS_OPTIMIZE_LIMIT_IN_SECS

#define FTS_OPTIMIZE_LIMIT_IN_SECS   "optimize_checkpoint_limit"

FTS config table name parameters.

The number of seconds after which an OPTIMIZE run will stop

◆ FTS_OPTIMIZE_START_TIME

#define FTS_OPTIMIZE_START_TIME   "optimize_start_time"

Start of optimize of an FTS index.

◆ FTS_STOPWORD_TABLE_NAME

#define FTS_STOPWORD_TABLE_NAME   "stopword_table_name"

User specified stopword table name.

◆ FTS_SYNCED_DOC_ID

#define FTS_SYNCED_DOC_ID   "synced_doc_id"

The next doc id.

◆ FTS_TABLE_STATE

#define FTS_TABLE_STATE   "table_state"

State of the FTS system for this table.

It can be one of RUNNING, OPTIMIZING, DELETED.

◆ FTS_TOTAL_DELETED_COUNT

#define FTS_TOTAL_DELETED_COUNT   "deleted_doc_count"

Total number of documents that have been deleted.

The next_doc_id minus this count gives us the total number of documents.

◆ FTS_TOTAL_WORD_COUNT

#define FTS_TOTAL_WORD_COUNT   "total_word_count"

Total number of words parsed from all documents.

◆ FTS_USE_STOPWORD

#define FTS_USE_STOPWORD   "use_stopword"

Whether to use (turn on/off) stopword.

Typedef Documentation

◆ fts_table_state_t

Enumeration Type Documentation

◆ fts_table_state_enum

Enumerator
FTS_TABLE_STATE_RUNNING 

Auxiliary tables created OK.

FTS_TABLE_STATE_OPTIMIZING 

This is a substate of RUNNING.

FTS_TABLE_STATE_DELETED 

All aux tables to be dropped when it's safe to do so.

Function Documentation

◆ fts_bsearch()

int fts_bsearch ( fts_update_t array,
int  lower,
int  upper,
doc_id_t  doc_id 
)

Do a binary search for a doc id in the array.

Returns
+ve index if found -ve index where it should be inserted if not found in: doc id to lookup
+ve index if found -ve index where it should be inserted if not found
Parameters
arrayin: array to sort
lowerin: the array lower bound
upperin: the array upper bound
doc_idin: the doc id to search for

◆ fts_cache_append_deleted_doc_ids()

void fts_cache_append_deleted_doc_ids ( const fts_cache_t cache,
ib_vector_t vector 
)

Append deleted doc ids to vector and sort the vector.

in: append to this vector

Append deleted doc ids to vector and sort the vector.

Parameters
cachein: cache to use
vectorin: append to this vector

◆ fts_cache_find_word()

const ib_vector_t * fts_cache_find_word ( const fts_index_cache_t index_cache,
const fts_string_t text 
)

Search cache for word.

Returns
the word node vector if found else NULL in: word to search for
the word node vector if found else NULL
Parameters
index_cachein: cache to search
textin: word to search for

◆ fts_cache_node_add_positions()

void fts_cache_node_add_positions ( fts_cache_t cache,
fts_node_t node,
doc_id_t  doc_id,
ib_vector_t positions 
)

Add node positions.

in: fts_token_t::positions

Add node positions.

Parameters
cachein: cache
nodein: word node
doc_idin: doc id
positionsin: fts_token_t::positions

◆ fts_check_token()

bool fts_check_token ( const fts_string_t token,
const ib_rbt_t stopwords,
bool  is_ngram,
const CHARSET_INFO cs 
)

Check fts token.

  1. for ngram token, check whether the token contains any words in stopwords
  2. for non-ngram token, check if it's stopword or less than fts_min_token_size or greater than fts_max_token_size.
    Parameters
    [in]tokentoken string
    [in]stopwordsstopwords rb tree
    [in]is_ngramis ngram parser
    [in]cstoken charset
    Return values
    trueif it is not stopword and length in range
    falseif it is stopword or length not in range

◆ fts_config_create_index_param_name()

char * fts_config_create_index_param_name ( const char *  param,
const dict_index_t index 
)

Create the config table name for retrieving index specific value.

Returns
index config parameter name in: index for config
index config parameter name
Parameters
paramin: base name of param
indexin: index for config

◆ fts_config_get_index_value()

dberr_t fts_config_get_index_value ( trx_t trx,
dict_index_t index,
const char *  param,
fts_string_t value 
)

Get value specific to an FTS index from the config table.

The caller must ensure that enough space is allocated for value to hold the column contents.

Returns
DB_SUCCESS or error code out: value read from config table

The caller must ensure that enough space is allocated for value to hold the column contents.

Returns
DB_SUCCESS or error code
Parameters
trxtransaction
indexin: index
paramin: get config value for this parameter name
valueout: value read from config table

◆ fts_config_get_ulint()

dberr_t fts_config_get_ulint ( trx_t trx,
fts_table_t fts_table,
const char *  name,
ulint int_value 
)

Get an ulint value from the config table.

Returns
DB_SUCCESS or error code out: value
DB_SUCCESS if all OK else error code
Parameters
trxin: transaction
fts_tablein: the indexed FTS table
namein: param name
int_valueout: value

◆ fts_config_get_value()

dberr_t fts_config_get_value ( trx_t trx,
fts_table_t fts_table,
const char *  name,
fts_string_t value 
)

Get value from config table.

The caller must ensure that enough space is allocated for value to hold the column contents

Returns
DB_SUCCESS or error code out: value read from config table

Get value from config table.

The caller must ensure that enough space is allocated for value to hold the column contents.

Returns
DB_SUCCESS or error code
Parameters
trxtransaction
fts_tablein: the indexed FTS table
namein: get config value for this parameter name
valueout: value read from config table

◆ fts_config_set_index_value()

dberr_t fts_config_set_index_value ( trx_t trx,
dict_index_t index,
const char *  param,
fts_string_t value 
)

Set the value specific to an FTS index in the config table.

Returns
DB_SUCCESS or error code out: value read from config table
DB_SUCCESS or error code
Parameters
trxtransaction
indexin: index
paramin: get config value for this parameter name
valueout: value read from config table

◆ fts_config_set_ulint()

dberr_t fts_config_set_ulint ( trx_t trx,
fts_table_t fts_table,
const char *  name,
ulint  int_value 
)

Set an ulint value in the config table.

Returns
DB_SUCCESS if all OK else error code in: value
DB_SUCCESS if all OK else error code
Parameters
trxin: transaction
fts_tablein: the indexed FTS table
namein: param name
int_valuein: value

◆ fts_config_set_value()

dberr_t fts_config_set_value ( trx_t trx,
fts_table_t fts_table,
const char *  name,
const fts_string_t value 
)

Set the value in the config table for name.

Returns
DB_SUCCESS or error code in: value to update
DB_SUCCESS or error code
Parameters
trxtransaction
fts_tablein: the indexed FTS table
namein: get config value for this parameter name
valuein: value to update

◆ fts_doc_fetch_by_doc_id()

dberr_t fts_doc_fetch_by_doc_id ( fts_get_doc_t get_doc,
doc_id_t  doc_id,
dict_index_t index_to_use,
ulint  option,
fts_sql_callback  callback,
void *  arg 
)

Fetch document (= a single row's indexed text) with the given document id.

Returns
: DB_SUCCESS if fetch is successful, else error in: callback arg

Fetch document (= a single row's indexed text) with the given document id.

Returns
DB_SUCCESS if OK else error
Parameters
get_docin: state
doc_idin: id of document to fetch
index_to_usein: caller supplied FTS index, or NULL
optionin: search option, if it is greater than doc_id or equal
callbackin: callback to read
argin: callback arg

◆ fts_doc_free()

void fts_doc_free ( fts_doc_t doc)

Free document.

in: document

Parameters
docin: document

◆ fts_doc_init()

void fts_doc_init ( fts_doc_t doc)

Initialize a document.

in: doc to initialize

Parameters
docin: doc to initialize

◆ fts_eval_sql()

dberr_t fts_eval_sql ( trx_t trx,
que_t graph 
)

Evaluate a parsed SQL statement.

Returns
DB_SUCCESS or error code in: Parsed statement

Evaluate a parsed SQL statement.

Returns
DB_SUCCESS or error code
Parameters
trxin: transaction
graphin: Query graph to evaluate

◆ fts_find_index_cache()

fts_index_cache_t * fts_find_index_cache ( const fts_cache_t cache,
const dict_index_t index 
)

Search the index specific cache for a particular FTS index.

Returns
the index specific cache else NULL in: index to search for
the index specific cache else NULL
Parameters
cachein: cache to search
indexin: index to search for

◆ fts_get_select_columns_str()

const char * fts_get_select_columns_str ( dict_index_t index,
pars_info_t info,
mem_heap_t heap 
)

Construct the column specification part of the SQL string for selecting the indexed FTS columns for the given table.

Adds the necessary bound ids to the given 'info' and returns the SQL string. Examples:

One indexed column named "text":

"$sel0", info/ids: sel0 -> "text"

Two indexed columns named "subject" and "content":

"$sel0, $sel1", info/ids: sel0 -> "subject", sel1 -> "content",

Returns
heap-allocated WHERE string in: memory heap

Adds the necessary bound ids to the given 'info' and returns the SQL string. Examples:

One indexed column named "text":

"$sel0", info/ids: sel0 -> "text"

Two indexed columns named "subject" and "content":

"$sel0, $sel1", info/ids: sel0 -> "subject", sel1 -> "content",

Returns
heap-allocated WHERE string
Parameters
indexin: index
infoin/out: parser info
heapin: memory heap

◆ fts_get_table_id()

int fts_get_table_id ( const fts_table_t fts_table,
char *  table_id 
)

Get the table id.

Returns
number of bytes written out: table id, must be at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long
number of bytes written
Parameters
fts_tablein: FTS Auxiliary table
table_idout: table id, must be at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long

◆ fts_get_table_name()

void fts_get_table_name ( const fts_table_t fts_table,
char *  table_name 
)

Construct the name of an ancillary FTS table for the given table.

Caller must allocate enough memory(usually size of MAX_FULL_NAME_LEN) for param 'table_name'. in/out: aux table name

Caller must allocate enough memory(usually size of MAX_FULL_NAME_LEN) for param 'table_name'.

Parameters
fts_tablein: Auxiliary table type
table_namein/out: aux table name

◆ fts_get_table_name_5_7()

void fts_get_table_name_5_7 ( const fts_table_t fts_table,
char *  table_name 
)

Construct the name of an ancillary FTS table for the given table in 5.7 compatible format.

Caller must allocate enough memory(usually size of MAX_FULL_NAME_LEN) for param 'table_name'

Parameters
[in]fts_tableAuxiliary table object
[in,out]table_nameaux table name

◆ fts_get_table_name_prefix()

char * fts_get_table_name_prefix ( const fts_table_t fts_table)

Construct the prefix name of an FTS table.

Returns
own: table name, must be freed with ut::free() in: Auxiliary table type
own: table name, must be freed with ut::free()
Parameters
fts_tablein: Auxiliary table type

◆ fts_index_fetch_nodes()

dberr_t fts_index_fetch_nodes ( trx_t trx,
que_t **  graph,
fts_table_t fts_table,
const fts_string_t word,
fts_fetch_t fetch 
)

Read the rows from the FTS inde.

Returns
DB_SUCCESS or error code in: fetch callback.
DB_SUCCESS or error code
Parameters
trxin: transaction
graphin: prepared statement
fts_tablein: table of the FTS INDEX
wordin: the word to fetch
fetchin: fetch callback.

◆ fts_optimize_add_table()

void fts_optimize_add_table ( dict_table_t table)

Add the table to add to the OPTIMIZER's list.

in: table to add

Parameters
tablein: table to add

◆ fts_parse_sql()

que_t * fts_parse_sql ( fts_table_t fts_table,
pars_info_t info,
const char *  sql 
)

Parse an SQL string.

s is replaced with the table's id.

Returns
query graph in: SQL string to evaluate
query graph
Parameters
fts_tablein: FTS auxiliarry table info
infoin: info struct, or NULL
sqlin: SQL string to evaluate

◆ fts_query_expansion_fetch_doc()

bool fts_query_expansion_fetch_doc ( void *  row,
void *  user_arg 
)

Callback function for fetch that stores the text of an FTS document, converting each column to UTF-16.

Returns
always false in: fts_doc_t*
always false
Parameters
rowin: sel_node_t*
user_argin: fts_doc_t*

◆ fts_read_object_id()

static bool fts_read_object_id ( ib_id_t id,
const char *  str 
)
inlinestatic

Read the table id from the string generated by fts_write_object_id().

Parameters
[out]idTable ID.
[in]strBuffer to read from.
Returns
true if parse successful

◆ fts_sql_commit()

dberr_t fts_sql_commit ( trx_t trx)

Commit a transaction.

Returns
DB_SUCCESS if all OK in: transaction
DB_SUCCESS or error code
Parameters
trxin: transaction

◆ fts_sql_rollback()

dberr_t fts_sql_rollback ( trx_t trx)

Rollback a transaction.

Returns
DB_SUCCESS if all OK in: transaction
DB_SUCCESS or error code
Parameters
trxin: transaction

◆ fts_trx_table_cmp()

static int fts_trx_table_cmp ( const void *  v1,
const void *  v2 
)
inlinestatic

Compare two fts_trx_table_t instances, we actually compare the table id's here.

Parameters
[in]v1id1
[in]v2id2
Returns
< 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2

◆ fts_trx_table_id_cmp()

static int fts_trx_table_id_cmp ( const void *  p1,
const void *  p2 
)
inlinestatic

Compare a table id with a trx_table_t table id.

Parameters
[in]p1id1
[in]p2id2
Returns
< 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2

◆ fts_wait_for_background_thread_to_start()

bool fts_wait_for_background_thread_to_start ( dict_table_t table,
std::chrono::microseconds  max_wait 
)

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.

Parameters
[in]tabletable to which the thread is attached
[in]max_waitTime to wait. If set to 0 then it disables timeout checking
Returns
true if the thread started else false (i.e timed out)

◆ fts_word_free()

void fts_word_free ( fts_word_t word)

Free fts_optimizer_word_t instanace.

in: instance to free.

Parameters
wordin: instance to free.

◆ fts_write_node()

dberr_t fts_write_node ( trx_t trx,
que_t **  graph,
fts_table_t fts_table,
fts_string_t word,
fts_node_t node 
)

in: node columns

in: node columns

Returns
DB_SUCCESS if all OK.
Parameters
trxin: transaction
graphin: query graph
fts_tablein: aux table
wordin: word in UTF-8
nodein: node columns

◆ fts_write_object_id()

static int fts_write_object_id ( ib_id_t  id,
char *  str 
)
inlinestatic

Write the table id to the given buffer (including final NUL).

Buffer must be at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long.

Parameters
[in]ida table/index id
[in]strbuffer to write the id to
Returns
number of bytes written

Variable Documentation

◆ FTS_MAX_BACKGROUND_THREAD_WAIT

constexpr std::chrono::milliseconds FTS_MAX_BACKGROUND_THREAD_WAIT {10}
constexpr

The default time to wait for the background thread.