MySQL 9.1.0
Source Code Documentation
fulltext.h
Go to the documentation of this file.
1/* Copyright (c) 2000, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
25
26/**
27 @file storage/myisam/fulltext.h
28 Some definitions for full-text indices
29*/
30
31#include "ft_global.h"
34
35#define HA_FT_WTYPE HA_KEYTYPE_FLOAT
36#define HA_FT_WLEN 4
37#define FT_SEGS 2
38
39/**
40 Accessor methods for the weight and the number of subkeys in a buffer.
41
42 The weight is of float type and subkeys number is of integer type. Both
43 are stored in the same position of the buffer and the stored object is
44 identified by the sign (bit): the weight value is positive whilst the
45 number of subkeys is negative.
46
47 In light of C's strict-aliasing rules, which roughly state that an object
48 must not be accessed through incompatible types, these methods are used to
49 avoid any problems arising from the type duality inside the buffer. The
50 values are retrieved using a character type which can access any object.
51*/
52#define ft_sintXkorr(A) mi_sint4korr(A)
53#define ft_intXstore(T, A) mi_int4store(T, A)
54#define ft_floatXget(M) mi_float4get(M)
55
56extern const HA_KEYSEG ft_keysegs[FT_SEGS];
57
58int _mi_ft_cmp(MI_INFO *, uint, const uchar *, const uchar *);
59int _mi_ft_add(MI_INFO *, uint, uchar *, const uchar *, my_off_t);
60int _mi_ft_del(MI_INFO *, uint, uchar *, const uchar *, my_off_t);
61
62uint _mi_ft_convert_to_ft2(MI_INFO *, uint, uchar *);
Some definitions for full-text indices.
const HA_KEYSEG ft_keysegs[FT_SEGS]
Definition: ft_static.cc:39
int _mi_ft_add(MI_INFO *, uint, uchar *, const uchar *, my_off_t)
Definition: ft_update.cc:235
uint _mi_ft_convert_to_ft2(MI_INFO *, uint, uchar *)
Definition: ft_update.cc:286
int _mi_ft_del(MI_INFO *, uint, uchar *, const uchar *, my_off_t)
Definition: ft_update.cc:252
int _mi_ft_cmp(MI_INFO *, uint, const uchar *, const uchar *)
Definition: ft_update.cc:168
#define FT_SEGS
Definition: fulltext.h:37
ulonglong my_off_t
Definition: my_inttypes.h:72
unsigned char uchar
Definition: my_inttypes.h:52
Definition: my_compare.h:60
Definition: myisamdef.h:254