MySQL 8.0.31
Source Code Documentation
fts0types.ic File Reference

Full text search types. More...

#include "ha_prototypes.h"
#include "rem0cmp.h"

Macros

#define INNOBASE_FTS0TYPES_IC
 

Functions

static void fts_string_dup (fts_string_t *dst, const fts_string_t *src, mem_heap_t *heap)
 Duplicate a string. More...
 
static int fts_trx_row_doc_id_cmp (const void *p1, const void *p2)
 Compare two fts_trx_row_t doc_ids. More...
 
static int fts_ranking_doc_id_cmp (const void *p1, const void *p2)
 Compare two fts_ranking_t doc_ids. More...
 
static int fts_update_doc_id_cmp (const void *p1, const void *p2)
 Compare two fts_update_t doc_ids. More...
 
ulint innobase_strnxfrm (const CHARSET_INFO *cs, const uchar *p2, const ulint len2)
 Get the first character's code position for FTS index partition. More...
 
static bool fts_is_charset_cjk (const CHARSET_INFO *cs)
 Check if fts index charset is cjk. More...
 
static ulint fts_select_index_by_range (const CHARSET_INFO *cs, const byte *str, ulint len)
 Select the FTS auxiliary index for the given character by range. More...
 
static ulint fts_select_index_by_hash (const CHARSET_INFO *cs, const byte *str, ulint len)
 Select the FTS auxiliary index for the given character by hash. More...
 
static ulint fts_select_index (const CHARSET_INFO *cs, const byte *str, ulint len)
 Select the FTS auxiliary index for the given character. More...
 
static const char * fts_get_suffix (ulint selected)
 Return the selected FTS aux index suffix. More...
 
static const char * fts_get_suffix_5_7 (ulint selected)
 Return the selected FTS aux index suffix in 5.7 compatible format. More...
 

Detailed Description

Full text search types.

Created 2007-03-27 Sunny Bains

Macro Definition Documentation

◆ INNOBASE_FTS0TYPES_IC

#define INNOBASE_FTS0TYPES_IC

Function Documentation

◆ fts_get_suffix()

static const char * fts_get_suffix ( ulint  selected)
inlinestatic

Return the selected FTS aux index suffix.

Parameters
selectedin: selected index

◆ fts_get_suffix_5_7()

static const char * fts_get_suffix_5_7 ( ulint  selected)
inlinestatic

Return the selected FTS aux index suffix in 5.7 compatible format.

Parameters
[in]selectedselected index
Returns
the suffix name

◆ fts_is_charset_cjk()

static bool fts_is_charset_cjk ( const CHARSET_INFO cs)
inlinestatic

Check if fts index charset is cjk.

Parameters
[in]cscharset
Return values
trueif the charset is cjk
falseif not.

◆ fts_ranking_doc_id_cmp()

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

Compare two fts_ranking_t doc_ids.

Returns
< 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2
Parameters
p1in: id1
p2in: id2

◆ fts_select_index()

static ulint fts_select_index ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inlinestatic

Select the FTS auxiliary index for the given character.

Parameters
[in]cscharset
[in]strstring
[in]lenstring length in bytes
Return values
theindex to use for the string

◆ fts_select_index_by_hash()

static ulint fts_select_index_by_hash ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inlinestatic

Select the FTS auxiliary index for the given character by hash.

Parameters
[in]cscharset
[in]strstring
[in]lenstring length
Return values
theindex to use for the string

◆ fts_select_index_by_range()

static ulint fts_select_index_by_range ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inlinestatic

Select the FTS auxiliary index for the given character by range.

Parameters
[in]cscharset
[in]strstring
[in]lenstring length
Return values
theindex to use for the string

◆ fts_string_dup()

static void fts_string_dup ( fts_string_t dst,
const fts_string_t src,
mem_heap_t heap 
)
inlinestatic

Duplicate a string.

Parameters
dstin: dup to here
srcin: src string
heapin: heap to use

◆ fts_trx_row_doc_id_cmp()

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

Compare two fts_trx_row_t doc_ids.

Returns
< 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2
Parameters
p1in: id1
p2in: id2

◆ fts_update_doc_id_cmp()

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

Compare two fts_update_t doc_ids.

Returns
< 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2
Parameters
p1in: id1
p2in: id2

◆ innobase_strnxfrm()

ulint innobase_strnxfrm ( const CHARSET_INFO cs,
const uchar p2,
const ulint  len2 
)

Get the first character's code position for FTS index partition.

Parameters
[in]csCharacter set
[in]p2string
[in]len2string length