MySQL 8.0.29
Source Code Documentation
fulltext.h File Reference

Some definitions for full-text indices. More...

Go to the source code of this file.

Macros

#define HA_FT_WTYPE   HA_KEYTYPE_FLOAT
 
#define HA_FT_WLEN   4
 
#define FT_SEGS   2
 
#define ft_sintXkorr(A)   mi_sint4korr(A)
 Accessor methods for the weight and the number of subkeys in a buffer. More...
 
#define ft_intXstore(T, A)   mi_int4store(T, A)
 
#define ft_floatXget(M)   mi_float4get(M)
 

Functions

int _mi_ft_cmp (MI_INFO *, uint, const uchar *, const uchar *)
 
int _mi_ft_add (MI_INFO *, uint, uchar *, const uchar *, my_off_t)
 
int _mi_ft_del (MI_INFO *, uint, uchar *, const uchar *, my_off_t)
 
uint _mi_ft_convert_to_ft2 (MI_INFO *, uint, uchar *)
 

Variables

const HA_KEYSEG ft_keysegs [FT_SEGS]
 

Detailed Description

Some definitions for full-text indices.

Macro Definition Documentation

◆ ft_floatXget

#define ft_floatXget (   M)    mi_float4get(M)

◆ ft_intXstore

#define ft_intXstore (   T,
 
)    mi_int4store(T, A)

◆ FT_SEGS

#define FT_SEGS   2

◆ ft_sintXkorr

#define ft_sintXkorr (   A)    mi_sint4korr(A)

Accessor methods for the weight and the number of subkeys in a buffer.

The weight is of float type and subkeys number is of integer type. Both are stored in the same position of the buffer and the stored object is identified by the sign (bit): the weight value is positive whilst the number of subkeys is negative.

In light of C's strict-aliasing rules, which roughly state that an object must not be accessed through incompatible types, these methods are used to avoid any problems arising from the type duality inside the buffer. The values are retrieved using a character type which can access any object.

◆ HA_FT_WLEN

#define HA_FT_WLEN   4

◆ HA_FT_WTYPE

#define HA_FT_WTYPE   HA_KEYTYPE_FLOAT

Function Documentation

◆ _mi_ft_add()

int _mi_ft_add ( MI_INFO info,
uint  keynr,
uchar keybuf,
const uchar record,
my_off_t  pos 
)

◆ _mi_ft_cmp()

int _mi_ft_cmp ( MI_INFO info,
uint  keynr,
const uchar rec1,
const uchar rec2 
)

◆ _mi_ft_convert_to_ft2()

uint _mi_ft_convert_to_ft2 ( MI_INFO info,
uint  keynr,
uchar key 
)

◆ _mi_ft_del()

int _mi_ft_del ( MI_INFO info,
uint  keynr,
uchar keybuf,
const uchar record,
my_off_t  pos 
)

Variable Documentation

◆ ft_keysegs

const HA_KEYSEG ft_keysegs[FT_SEGS]
extern