MySQL 9.1.0
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

void fts_string_dup (fts_string_t *dst, const fts_string_t *src, mem_heap_t *heap)
 Duplicate a string. More...
 
int fts_doc_id_cmp (doc_id_t id1, doc_id_t id2)
 Compare two doc_ids. More...
 
template<typename T >
int fts_doc_id_field_cmp (const void *p1, const void *p2)
 Compare doc_ids of 2 objects. 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...
 
bool fts_is_charset_cjk (const CHARSET_INFO *cs)
 Check if fts index charset is cjk. More...
 
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...
 
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...
 
ulint fts_select_index (const CHARSET_INFO *cs, const byte *str, ulint len)
 Select the FTS auxiliary table for the given character. More...
 
const char * fts_get_suffix (ulint selected)
 Return the selected FTS aux index suffix. More...
 
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_doc_id_cmp()

int fts_doc_id_cmp ( doc_id_t  id1,
doc_id_t  id2 
)
inline

Compare two doc_ids.

Parameters
[in]id11st doc_id to compare
[in]id22nd doc_id to compare
Returns
< 0 if id1 < id2, 0 if id1 == id2, > 0 if id1 > id2

◆ fts_doc_id_field_cmp()

template<typename T >
int fts_doc_id_field_cmp ( const void *  p1,
const void *  p2 
)

Compare doc_ids of 2 objects.

Parameters
[in]p1Pointer to first instance o1 of T
[in]p2Pointer to second instance o2 of T
Returns
sign(o1->doc_id - o2->doc_id)

◆ fts_get_suffix()

const char * fts_get_suffix ( ulint  selected)
inline

Return the selected FTS aux index suffix.

Get the selected FTS aux INDEX suffix.

Parameters
selectedin: selected index

◆ fts_get_suffix_5_7()

const char * fts_get_suffix_5_7 ( ulint  selected)
inline

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

Parameters
[in]selectedselected index
Returns
the suffix name

◆ fts_is_charset_cjk()

bool fts_is_charset_cjk ( const CHARSET_INFO cs)
inline

Check if fts index charset is cjk.

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

◆ fts_select_index()

ulint fts_select_index ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inline

Select the FTS auxiliary table for the given character.

Parameters
[in]cscharset
[in]strstring
[in]lenstring length in bytes
Return values
theauxiliary table number to use for the string, zero-based

◆ fts_select_index_by_hash()

ulint fts_select_index_by_hash ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inline

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()

ulint fts_select_index_by_range ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inline

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()

void fts_string_dup ( fts_string_t dst,
const fts_string_t src,
mem_heap_t heap 
)
inline

Duplicate a string.

Parameters
[in]dstdup to here
[in]srcsrc string
[in]heapheap to use
Parameters
dstin: dup to here
srcin: src string
heapin: heap to use

◆ 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