MySQL 8.0.32
Source Code Documentation
fulltext.h
Go to the documentation of this file.
1/* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
24
25/**
26 @file storage/myisam/fulltext.h
27 Some definitions for full-text indices
28*/
29
30#include "ft_global.h"
33
34#define HA_FT_WTYPE HA_KEYTYPE_FLOAT
35#define HA_FT_WLEN 4
36#define FT_SEGS 2
37
38/**
39 Accessor methods for the weight and the number of subkeys in a buffer.
40
41 The weight is of float type and subkeys number is of integer type. Both
42 are stored in the same position of the buffer and the stored object is
43 identified by the sign (bit): the weight value is positive whilst the
44 number of subkeys is negative.
45
46 In light of C's strict-aliasing rules, which roughly state that an object
47 must not be accessed through incompatible types, these methods are used to
48 avoid any problems arising from the type duality inside the buffer. The
49 values are retrieved using a character type which can access any object.
50*/
51#define ft_sintXkorr(A) mi_sint4korr(A)
52#define ft_intXstore(T, A) mi_int4store(T, A)
53#define ft_floatXget(M) mi_float4get(M)
54
55extern const HA_KEYSEG ft_keysegs[FT_SEGS];
56
57int _mi_ft_cmp(MI_INFO *, uint, const uchar *, const uchar *);
58int _mi_ft_add(MI_INFO *, uint, uchar *, const uchar *, my_off_t);
59int _mi_ft_del(MI_INFO *, uint, uchar *, const uchar *, my_off_t);
60
Some definitions for full-text indices.
const HA_KEYSEG ft_keysegs[FT_SEGS]
Definition: ft_static.cc:36
int _mi_ft_add(MI_INFO *, uint, uchar *, const uchar *, my_off_t)
Definition: ft_update.cc:232
uint _mi_ft_convert_to_ft2(MI_INFO *, uint, uchar *)
Definition: ft_update.cc:283
int _mi_ft_del(MI_INFO *, uint, uchar *, const uchar *, my_off_t)
Definition: ft_update.cc:249
int _mi_ft_cmp(MI_INFO *, uint, const uchar *, const uchar *)
Definition: ft_update.cc:165
#define FT_SEGS
Definition: fulltext.h:36
ulonglong my_off_t
Definition: my_inttypes.h:71
unsigned char uchar
Definition: my_inttypes.h:51
Definition: my_compare.h:59
Definition: myisamdef.h:251
unsigned int uint
Definition: uca-dump.cc:29