MySQL 8.0.39
Source Code Documentation
myisam.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2000, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24
25/**
26 @file include/myisam.h
27 This file should be included when using myisam functions.
28*/
29
30#ifndef _myisam_h
31#define _myisam_h
32
33#include "my_config.h"
34
35#include <sys/types.h>
36#include <time.h>
37
38#include "keycache.h"
39#include "m_ctype.h"
40#include "m_string.h"
41#include "my_base.h"
42#include "my_check_opt.h"
43#include "my_checksum.h" // ha_checksum
44#include "my_compare.h"
45#include "my_inttypes.h"
46#include "my_io.h"
47#include "my_macros.h"
48
49/*
50 Limit max keys according to HA_MAX_POSSIBLE_KEY
51*/
52
53#if MAX_INDEXES > HA_MAX_POSSIBLE_KEY
54#define MI_MAX_KEY HA_MAX_POSSIBLE_KEY /* Max allowed keys */
55#else
56#define MI_MAX_KEY MAX_INDEXES /* Max allowed keys */
57#endif
58
59#define MI_MAX_POSSIBLE_KEY_BUFF HA_MAX_POSSIBLE_KEY_BUFF
60/*
61 The following defines can be increased if necessary.
62 But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
63*/
64#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */
65#define MI_MAX_KEY_SEG 16 /* Max segments for key */
66
67#define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH + MI_MAX_KEY_SEG * 6 + 8 + 8)
68#define MI_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */
69#define MI_NAME_IEXT ".MYI"
70#define MI_NAME_DEXT ".MYD"
71
72/* Possible values for myisam_block_size (must be power of 2) */
73#define MI_KEY_BLOCK_LENGTH 1024U /* default key block length */
74#define MI_MIN_KEY_BLOCK_LENGTH 1024U /* Min key block length */
75#define MI_MAX_KEY_BLOCK_LENGTH 16384U
76
77/*
78 In the following macros '_keyno_' is 0 .. keys-1.
79 If there can be more keys than bits in the key_map, the highest bit
80 is for all upper keys. They cannot be switched individually.
81 This means that clearing of high keys is ignored, setting one high key
82 sets all high keys.
83*/
84#define MI_KEYMAP_BITS (8 * SIZEOF_LONG_LONG)
85#define MI_KEYMAP_HIGH_MASK (1ULL << (MI_KEYMAP_BITS - 1))
86#define mi_get_mask_all_keys_active(_keys_) \
87 (((_keys_) < MI_KEYMAP_BITS) ? ((1ULL << (_keys_)) - 1ULL) : (~0ULL))
88
89#if MI_MAX_KEY > MI_KEYMAP_BITS
90
91inline bool mi_is_key_active(uint64 _keymap_, unsigned int _keyno_) {
92 return (((_keyno_) < MI_KEYMAP_BITS) ? ((_keymap_) & (1ULL << (_keyno_)))
93 : ((_keymap_)&MI_KEYMAP_HIGH_MASK));
94}
95
96#define mi_set_key_active(_keymap_, _keyno_) \
97 (_keymap_) |= (((_keyno_) < MI_KEYMAP_BITS) ? (1ULL << (_keyno_)) \
98 : MI_KEYMAP_HIGH_MASK)
99#define mi_clear_key_active(_keymap_, _keyno_) \
100 (_keymap_) &= (((_keyno_) < MI_KEYMAP_BITS) ? (~(1ULL << (_keyno_))) \
101 : (~(0ULL)) /*ignore*/)
102
103#else
104
105inline bool mi_is_key_active(uint64 _keymap_, unsigned int _keyno_) {
106 return ((_keymap_) & (1ULL << (_keyno_)));
107}
108#define mi_set_key_active(_keymap_, _keyno_) (_keymap_) |= (1ULL << (_keyno_))
109#define mi_clear_key_active(_keymap_, _keyno_) \
110 (_keymap_) &= (~(1ULL << (_keyno_)))
111
112#endif
113
114inline bool mi_is_any_key_active(uint64 _keymap_) { return (_keymap_ != 0); }
115#define mi_is_all_keys_active(_keymap_, _keys_) \
116 ((_keymap_) == mi_get_mask_all_keys_active(_keys_))
117#define mi_set_all_keys_active(_keymap_, _keys_) \
118 (_keymap_) = mi_get_mask_all_keys_active(_keys_)
119#define mi_clear_all_keys_active(_keymap_) (_keymap_) = 0
120#define mi_intersect_keys_active(_to_, _from_) (_to_) &= (_from_)
121#define mi_is_any_intersect_keys_active(_keymap1_, _keys_, _keymap2_) \
122 ((_keymap1_) & (_keymap2_)&mi_get_mask_all_keys_active(_keys_))
123#define mi_copy_keys_active(_to_, _maxkeys_, _from_) \
124 (_to_) = (mi_get_mask_all_keys_active(_maxkeys_) & (_from_))
125
126/* Param to/from mi_status */
127
128struct MI_ISAMINFO /* Struct from h_info */
129{
130 ha_rows records{0}; /* Records in database */
131 ha_rows deleted{0}; /* Deleted records in database */
132 my_off_t recpos{0}; /* Pos for last used record */
133 my_off_t newrecpos{0}; /* Pos if we write new record */
134 my_off_t dupp_key_pos{0}; /* Position to record with dupp key */
135 my_off_t data_file_length{0}, /* Length of data file */
138 ulong reclength{0}; /* Recordlength */
139 ulong mean_reclength{0}; /* Mean recordlength (if packed) */
141 ulonglong key_map{0}; /* Which keys are used */
142 char *data_file_name{nullptr}, *index_file_name{nullptr};
143 uint keys{0}; /* Number of keys in use */
144 uint options{}; /* HA_OPTION_... used */
145 int errkey{0}, /* With key was duplicated on err */
146 sortkey{0}; /* clustered by this key */
147 File filenr{0}; /* (uniq) filenr for datafile */
148 time_t create_time{0}; /* When table was created */
149 time_t check_time{0};
150 time_t update_time{0};
153 ulong *rec_per_key{nullptr}; /* for sql optimizing */
154};
155
157 const char *index_file_name, *data_file_name; /* If using symlinks */
166};
167
168struct MI_INFO; /* For reference */
169struct MYISAM_SHARE;
170struct MI_INFO;
171struct MI_KEY_PARAM;
172
173struct MI_KEYDEF /* Key definition with open & info */
174{
175 MYISAM_SHARE *share; /* Pointer to base (set in mi_open) */
176 uint16 keysegs; /* Number of key-segment */
177 uint16 flag; /* NOSAME, PACK_USED */
178
179 uint8 key_alg; /* BTREE, RTREE */
180 uint16 block_length; /* Length of keyblock (auto) */
181 uint16 underflow_block_length; /* When to execute underflow */
182 uint16 keylength; /* Tot length of keyparts (auto) */
183 uint16 minlength; /* min length of (packed) key (auto) */
184 uint16 maxlength; /* max length of (packed) key (auto) */
185 uint16 block_size_index; /* block_size (auto) */
186 uint32 version; /* For concurrent read/write */
187 uint32 ftkey_nr; /* full-text index number */
188
190 struct st_mysql_ftparser *parser; /* Fulltext [pre]parser */
192 uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff,
193 bool *was_last_key);
194 uint (*get_key)(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key);
195 int (*pack_key)(MI_KEYDEF *keyinfo, uint nod_flag, const uchar *next_key,
196 uchar *org_key, uchar *prev_key, const uchar *key,
197 MI_KEY_PARAM *s_temp);
198 void (*store_key)(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp);
199 int (*ck_insert)(MI_INFO *inf, uint k_nr, uchar *k, uint klen);
200 int (*ck_delete)(MI_INFO *inf, uint k_nr, uchar *k, uint klen);
201};
202
203#define MI_UNIQUE_HASH_LENGTH 4
204
205struct MI_UNIQUEDEF /* Segment definition of unique */
206{
207 uint16 keysegs; /* Number of key-segment */
208 uchar key; /* Mapped to which key */
211};
212
213struct MI_DECODE_TREE /* Decode huff-table */
214{
218};
219
220struct MI_BIT_BUFF;
221
222/*
223 Note that null markers should always be first in a row !
224 When creating a column, one should only specify:
225 type, length, null_bit and null_pos
226*/
227
228struct MI_COLUMNDEF /* column information */
229{
230 int16 type; /* en_fieldtype */
231 uint16 length; /* length of field */
232 uint32 offset; /* Offset to position in row */
233 uint8 null_bit; /* If column may be 0 */
234 uint16 null_pos; /* position for null marker */
235
237 uchar *end);
241};
242
243extern const char *myisam_log_filename; /* Name of logfile */
244extern ulong myisam_block_size;
245extern ulong myisam_concurrent_insert;
248extern ulong myisam_data_pointer_size;
249
250/* usually used to check if a symlink points into the mysql data home */
251/* which is normally forbidden */
252extern int (*myisam_test_invalid_symlink)(const char *filename);
255
256/* Prototypes for myisam-functions */
257
258extern int mi_close_share(MI_INFO *file, bool *closed_share);
259#define mi_close(file) mi_close_share(file, NULL)
260extern int mi_delete(MI_INFO *file, const uchar *buff);
261extern MI_INFO *mi_open_share(const char *name, MYISAM_SHARE *old_share,
262 int mode, uint wait_if_locked);
263#define mi_open(name, mode, wait_if_locked) \
264 mi_open_share(name, NULL, mode, wait_if_locked)
265extern int mi_panic(enum ha_panic_function function);
266extern int mi_rfirst(MI_INFO *file, uchar *buf, int inx);
267extern int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
268 key_part_map keypart_map, enum ha_rkey_function search_flag);
269extern int mi_rlast(MI_INFO *file, uchar *buf, int inx);
270extern int mi_rnext(MI_INFO *file, uchar *buf, int inx);
271extern int mi_rnext_same(MI_INFO *info, uchar *buf);
272extern int mi_rprev(MI_INFO *file, uchar *buf, int inx);
273extern int mi_rrnd(MI_INFO *file, uchar *buf, my_off_t pos);
274extern int mi_scan_init(MI_INFO *file);
275extern int mi_scan(MI_INFO *file, uchar *buf);
276extern int mi_rsame(MI_INFO *file, uchar *record, int inx);
277extern int mi_rsame_with_pos(MI_INFO *file, uchar *record, int inx,
278 my_off_t pos);
279extern int mi_update(MI_INFO *file, const uchar *old, uchar *new_record);
280extern int mi_write(MI_INFO *file, uchar *buff);
282extern int mi_status(MI_INFO *info, MI_ISAMINFO *x, uint flag);
283extern int mi_lock_database(MI_INFO *file, int lock_type);
284extern int mi_create(const char *name, uint keys, MI_KEYDEF *keydef,
285 uint columns, MI_COLUMNDEF *columndef, uint uniques,
286 MI_UNIQUEDEF *uniquedef, MI_CREATE_INFO *create_info,
287 uint flags);
288extern int mi_delete_table(const char *name);
289extern int mi_rename(const char *from, const char *to);
290extern int mi_extra(MI_INFO *file, enum ha_extra_function function,
291 void *extra_arg);
292extern int mi_reset(MI_INFO *file);
293extern ha_rows mi_records_in_range(MI_INFO *info, int inx, key_range *min_key,
294 key_range *max_key);
295extern int mi_log(int activate_log);
296extern int mi_is_changed(MI_INFO *info);
297extern int mi_delete_all_rows(MI_INFO *info);
298extern ulong _mi_calc_blob_length(uint length, const uchar *pos);
299extern uint mi_get_pointer_length(ulonglong file_length, uint def);
300
301#define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for mmap file */
302/* this is used to pass to mysql_myisamchk_table */
303
304#define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */
305#define MYISAMCHK_VERIFY 2 /* Verify, run repair if failure */
306
307/*
308 Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
309 to mi_check.c follows:
310*/
311
312#define TT_USEFRM 1
313#define TT_FOR_UPGRADE 2
314
315#define O_NEW_INDEX 1 /* Bits set in out_flag */
316#define O_NEW_DATA 2
317#define O_DATA_LOST 4
318
319/* these struct is used by my_check to tell it what to do */
320
321struct SORT_KEY_BLOCKS /* Used when sorting */
322{
327};
328
329/*
330 MyISAM supports several statistics collection methods. Currently statistics
331 collection method is not stored in MyISAM file and has to be specified for
332 each table analyze/repair operation in MI_CHECK::stats_method.
333*/
334
335typedef enum {
336 /* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
338 /* Treat NULLs as equal when collecting statistics (like 4.0 did) */
340 /* Ignore NULLs - count only tuples without NULLs in the index components */
343
344struct MI_CHECK {
362 bool retry_repair{false}, force_sort{false};
364 MY_TMPDIR *tmpdir{nullptr};
368
369 /*
370 The next two are used to collect statistics, see update_key_parts for
371 description.
372 */
375
378 void *thd{nullptr};
379 const char *db_name{nullptr}, *table_name{nullptr};
380 const char *op_name{nullptr};
382};
383
386 int count;
388};
389
390struct SORT_INFO {
396 MI_INFO *info{nullptr};
397 MI_CHECK *param{nullptr};
398 uchar *buff{nullptr};
401};
402
403/* functions in mi_check */
404void myisamchk_init(MI_CHECK *param);
405int chk_status(MI_CHECK *param, MI_INFO *info);
406int chk_del(MI_CHECK *param, MI_INFO *info, uint test_flag);
407int chk_size(MI_CHECK *param, MI_INFO *info);
408int chk_key(MI_CHECK *param, MI_INFO *info);
409int chk_data_link(MI_CHECK *param, MI_INFO *info, int extend);
410int mi_repair(MI_CHECK *param, MI_INFO *info, char *name, int rep_quick,
411 bool no_copy_stat);
412int mi_sort_index(MI_CHECK *param, MI_INFO *info, char *name,
413 bool no_copy_stat);
414int mi_repair_by_sort(MI_CHECK *param, MI_INFO *info, const char *name,
415 int rep_quick, bool no_copy_stat);
416int change_to_newfile(const char *filename, const char *old_ext,
417 const char *new_ext, myf myflags);
418int lock_file(MI_CHECK *param, File file, int lock_type, const char *filetype,
419 const char *filename);
421void update_auto_increment_key(MI_CHECK *param, MI_INFO *info, bool repair);
423void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
424 ulonglong *unique, ulonglong *notnull, ulonglong records);
425int filecopy(MI_CHECK *param, File to, File from, my_off_t start,
426 my_off_t length, const char *type);
427int movepoint(MI_INFO *info, uchar *record, my_off_t oldpos, my_off_t newpos,
428 uint prot_key);
429int write_data_suffix(SORT_INFO *sort_info, bool fix_datafile);
431int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
434 bool force);
435
440 KEY_CACHE *key_cache);
441void mi_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache);
442int mi_preload(MI_INFO *info, ulonglong key_map, bool ignore_leaves);
443
446#endif
class to copying an field/item to a key struct
Definition: sql_select.h:810
int page
Definition: ctype-mb.cc:1236
#define MY_WAIT_IF_FULL
Definition: my_sys.h:124
#define MY_NABP
Definition: my_sys.h:121
#define MY_WME
Definition: my_sys.h:123
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
static uint keys
Definition: hp_test2.cc:46
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:177
Key cache variable structures.
#define KEY_CACHE_BLOCK_SIZE
Definition: keycache.h:64
A better implementation of the UNIX ctype(3) library.
This file includes constants used by all storage engines.
#define HA_OFFSET_ERROR
Definition: my_base.h:1143
ha_panic_function
Definition: my_base.h:431
data_file_type
Definition: my_base.h:1069
@ STATIC_RECORD
Definition: my_base.h:1070
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1007
my_off_t ha_rows
Definition: my_base.h:1140
ha_extra_function
Definition: my_base.h:184
en_fieldtype
Definition: my_base.h:1054
Abstraction functions over zlib/intrinsics.
std::uint32_t ha_checksum
Definition: my_checksum.h:106
#define HA_MAX_POSSIBLE_KEY
Definition: my_compare.h:47
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint8_t uint8
Definition: my_inttypes.h:63
ulonglong my_off_t
Definition: my_inttypes.h:72
unsigned char uchar
Definition: my_inttypes.h:52
int16_t int16
Definition: my_inttypes.h:64
uint64_t uint64
Definition: my_inttypes.h:69
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
int File
Definition: my_io_bits.h:51
Some common macros.
int mi_scan(MI_INFO *file, uchar *buf)
Definition: mi_scan.cc:48
int movepoint(MI_INFO *info, uchar *record, my_off_t oldpos, my_off_t newpos, uint prot_key)
Definition: mi_check.cc:1701
int filecopy(MI_CHECK *param, File to, File from, my_off_t start, my_off_t length, const char *type)
Definition: mi_check.cc:1966
int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
Definition: mi_check.cc:3315
int mi_write(MI_INFO *file, uchar *buff)
Definition: mi_write.cc:59
int chk_key(MI_CHECK *param, MI_INFO *info)
Definition: mi_check.cc:376
int mi_rlast(MI_INFO *file, uchar *buf, int inx)
Definition: mi_rlast.cc:30
#define MI_KEYMAP_BITS
Definition: myisam.h:84
int test_if_almost_full(MI_INFO *info)
Definition: mi_check.cc:3305
my_off_t mi_position(MI_INFO *file)
Definition: mi_info.cc:39
ulong myisam_block_size
Definition: mi_static.cc:57
const char * myisam_log_filename
Definition: mi_static.cc:54
my_off_t myisam_max_temp_length
Definition: mi_static.cc:62
int(* myisam_test_invalid_symlink)(const char *filename)
Definition: mi_static.cc:72
int mi_repair_by_sort(MI_CHECK *param, MI_INFO *info, const char *name, int rep_quick, bool no_copy_stat)
Definition: mi_check.cc:2015
int mi_rnext_same(MI_INFO *info, uchar *buf)
Definition: mi_rnext_same.cc:39
ulonglong myisam_mmap_size
Definition: mi_static.cc:64
#define MI_MAX_POSSIBLE_KEY_BUFF
Definition: myisam.h:59
void lock_memory(MI_CHECK *param)
ha_rows mi_records_in_range(MI_INFO *info, int inx, key_range *min_key, key_range *max_key)
Definition: mi_range.cc:62
int chk_data_link(MI_CHECK *param, MI_INFO *info, int extend)
Definition: mi_check.cc:888
mysql_mutex_t THR_LOCK_myisam_mmap
Definition: my_thr_init.cc:72
int mi_status(MI_INFO *info, MI_ISAMINFO *x, uint flag)
Definition: mi_info.cc:44
int mi_rrnd(MI_INFO *file, uchar *buf, my_off_t pos)
Definition: mi_rrnd.cc:41
enum_mi_stats_method
Definition: myisam.h:335
@ MI_STATS_METHOD_IGNORE_NULLS
Definition: myisam.h:341
@ MI_STATS_METHOD_NULLS_EQUAL
Definition: myisam.h:339
@ MI_STATS_METHOD_NULLS_NOT_EQUAL
Definition: myisam.h:337
uint mi_get_pointer_length(ulonglong file_length, uint def)
Definition: mi_create.cc:777
ulong myisam_data_pointer_size
Definition: mi_static.cc:63
ulong myisam_concurrent_insert
Definition: mi_static.cc:61
#define MI_MAX_KEY_SEG
Definition: myisam.h:65
int mi_rprev(MI_INFO *file, uchar *buf, int inx)
Definition: mi_rprev.cc:37
int mi_is_changed(MI_INFO *info)
Definition: mi_changed.cc:31
int mi_lock_database(MI_INFO *file, int lock_type)
Definition: mi_locking.cc:46
int mi_close_share(MI_INFO *file, bool *closed_share)
Definition: mi_close.cc:39
int mi_extra(MI_INFO *file, enum ha_extra_function function, void *extra_arg)
Definition: mi_extra.cc:54
int write_data_suffix(SORT_INFO *sort_info, bool fix_datafile)
Definition: mi_check.cc:3467
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part, ulonglong *unique, ulonglong *notnull, ulonglong records)
Definition: mi_check.cc:3649
int mi_delete(MI_INFO *file, const uchar *buff)
Definition: mi_delete.cc:51
int mi_log(int activate_log)
Definition: mi_log.cc:50
bool myisam_single_user
Definition: myisam.h:246
MI_INFO * mi_open_share(const char *name, MYISAM_SHARE *old_share, int mode, uint wait_if_locked)
Definition: mi_open.cc:100
st_keycache_thread_var main_thread_keycache_var
Definition: mi_static.cc:66
void update_auto_increment_key(MI_CHECK *param, MI_INFO *info, bool repair)
Definition: mi_check.cc:3551
int lock_file(MI_CHECK *param, File file, int lock_type, const char *filetype, const char *filename)
Definition: mi_check.cc:1950
int mi_preload(MI_INFO *info, ulonglong key_map, bool ignore_leaves)
Definition: mi_preload.cc:57
int mi_update(MI_INFO *file, const uchar *old, uchar *new_record)
Definition: mi_update.cc:38
bool mi_is_key_active(uint64 _keymap_, unsigned int _keyno_)
Definition: myisam.h:105
int mi_panic(enum ha_panic_function function)
Definition: mi_panic.cc:37
int chk_status(MI_CHECK *param, MI_INFO *info)
Definition: mi_check.cc:132
int chk_size(MI_CHECK *param, MI_INFO *info)
Definition: mi_check.cc:317
void mi_end_bulk_insert(MI_INFO *info)
Definition: mi_write.cc:925
#define MI_KEYMAP_HIGH_MASK
Definition: myisam.h:85
int mi_rsame(MI_INFO *file, uchar *record, int inx)
Definition: mi_rsame.cc:39
int mi_delete_table(const char *name)
Definition: mi_delete_table.cc:35
bool myisam_flush
Definition: mi_static.cc:58
int mi_rnext(MI_INFO *file, uchar *buf, int inx)
Definition: mi_rnext.cc:38
#define MI_MAX_KEY_BUFF
Definition: myisam.h:67
int update_state_info(MI_CHECK *param, MI_INFO *info, uint update)
Definition: mi_check.cc:3485
int chk_del(MI_CHECK *param, MI_INFO *info, uint test_flag)
Definition: mi_check.cc:157
int mi_reset(MI_INFO *file)
Definition: mi_extra.cc:237
bool mi_is_any_key_active(uint64 _keymap_)
Definition: myisam.h:114
int change_to_newfile(const char *filename, const char *old_ext, const char *new_ext, myf myflags)
Definition: mi_check.cc:1937
int mi_scan_init(MI_INFO *file)
Definition: mi_scan.cc:30
void myisamchk_init(MI_CHECK *param)
Definition: mi_check.cc:111
int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key, key_part_map keypart_map, enum ha_rkey_function search_flag)
Definition: mi_rkey.cc:36
int mi_repair(MI_CHECK *param, MI_INFO *info, char *name, int rep_quick, bool no_copy_stat)
Definition: mi_check.cc:1406
ulong _mi_calc_blob_length(uint length, const uchar *pos)
Definition: mi_dynrec.cc:1166
bool myisam_delay_key_write
Definition: myisam.h:246
void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows)
Definition: mi_check.cc:3725
ulonglong myisam_mmap_used
Definition: myisam.h:253
void mi_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache)
Definition: mi_keycache.cc:143
int mi_delete_all_rows(MI_INFO *info)
Definition: mi_delete_all.cc:35
int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map, KEY_CACHE *key_cache)
Definition: mi_keycache.cc:60
int mi_rfirst(MI_INFO *file, uchar *buf, int inx)
Definition: mi_rfirst.cc:30
int mi_rename(const char *from, const char *to)
Definition: mi_rename.cc:34
void mi_flush_bulk_insert(MI_INFO *info, uint inx)
Definition: mi_write.cc:918
int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
Definition: mi_write.cc:866
int mi_rsame_with_pos(MI_INFO *file, uchar *record, int inx, my_off_t pos)
Definition: mi_rsamepos.cc:41
int mi_sort_index(MI_CHECK *param, MI_INFO *info, char *name, bool no_copy_stat)
Definition: mi_check.cc:1749
st_keycache_thread_var * keycache_thread_var()
Definition: ha_myisam.cc:1922
bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, ulonglong key_map, bool force)
Definition: mi_check.cc:3748
int mi_create(const char *name, uint keys, MI_KEYDEF *keydef, uint columns, MI_COLUMNDEF *columndef, uint uniques, MI_UNIQUEDEF *uniquedef, MI_CREATE_INFO *create_info, uint flags)
Definition: mi_create.cc:55
static uint update
Definition: myisamlog.cc:91
Log info(cout, "NOTE")
static int record
Definition: mysqltest.cc:188
Definition: buf0block_hint.cc:30
Definition: os0file.h:86
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: options.cc:49
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
mode
Definition: file_handle.h:60
const char * filename
Definition: pfs_example_component_population.cc:67
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required string type
Definition: replication_group_member_actions.proto:34
case opt name
Definition: sslopt-case.h:33
Definition: my_compare.h:60
Definition: my_sys.h:341
Definition: keycache.h:73
Definition: myisamdef.h:243
Definition: myisam.h:344
const char * db_name
Definition: myisam.h:379
my_off_t key_blocks
Definition: myisam.h:352
ulonglong auto_increment_value
Definition: myisam.h:345
my_off_t search_after_block
Definition: myisam.h:350
char temp_filename[FN_REFLEN]
Definition: myisam.h:363
my_off_t start_check_pos
Definition: myisam.h:352
ha_checksum key_crc[HA_MAX_POSSIBLE_KEY]
Definition: myisam.h:376
ha_rows total_deleted
Definition: myisam.h:353
uint out_flag
Definition: myisam.h:357
ulonglong max_record_length
Definition: myisam.h:348
ulonglong use_buffers
Definition: myisam.h:355
const char * table_name
Definition: myisam.h:379
uint error_printed
Definition: myisam.h:357
bool force_sort
Definition: myisam.h:362
uint16 language
Definition: myisam.h:360
bool using_global_keycache
Definition: myisam.h:361
uint opt_sort_key
Definition: myisam.h:358
ulong write_buffer_length
Definition: myisam.h:356
uint max_level
Definition: myisam.h:358
uint testflag
Definition: myisam.h:359
ulong rec_per_key_part[MI_MAX_KEY_SEG *HA_MAX_POSSIBLE_KEY]
Definition: myisam.h:377
bool opt_follow_links
Definition: myisam.h:361
ha_checksum glob_crc
Definition: myisam.h:354
ulonglong unique_count[MI_MAX_KEY_SEG+1]
Definition: myisam.h:373
ulonglong keys_in_use
Definition: myisam.h:347
ulong sort_key_blocks
Definition: myisam.h:356
const char * op_name
Definition: myisam.h:380
char * isam_file_name
Definition: myisam.h:363
ulonglong notnull_count[MI_MAX_KEY_SEG+1]
Definition: myisam.h:374
ulonglong max_data_file_length
Definition: myisam.h:346
int tmpfile_createflag
Definition: myisam.h:365
uint key_cache_block_size
Definition: myisam.h:359
ha_checksum record_checksum
Definition: myisam.h:354
IO_CACHE read_cache
Definition: myisam.h:367
ha_rows total_records
Definition: myisam.h:353
void * thd
Definition: myisam.h:378
my_off_t totaldata
Definition: myisam.h:352
uint verbose
Definition: myisam.h:357
ulonglong sort_buffer_length
Definition: myisam.h:349
uint total_files
Definition: myisam.h:358
my_off_t new_file_pos
Definition: myisam.h:351
bool retry_repair
Definition: myisam.h:362
uint warning_printed
Definition: myisam.h:357
ulong read_buffer_length
Definition: myisam.h:356
my_off_t key_file_blocks
Definition: myisam.h:351
enum_mi_stats_method stats_method
Definition: myisam.h:381
my_off_t keydata
Definition: myisam.h:352
MY_TMPDIR * tmpdir
Definition: myisam.h:364
myf myf_rw
Definition: myisam.h:366
Definition: myisam.h:229
uint16 null_pos
Definition: myisam.h:234
MI_DECODE_TREE * huff_tree
Definition: myisam.h:240
uint32 offset
Definition: myisam.h:232
void(* unpack)(MI_COLUMNDEF *rec, MI_BIT_BUFF *buff, uchar *start, uchar *end)
Definition: myisam.h:236
int16 type
Definition: myisam.h:230
uint pack_type
Definition: myisam.h:239
enum en_fieldtype base_type
Definition: myisam.h:238
uint space_length_bits
Definition: myisam.h:239
uint16 length
Definition: myisam.h:231
uint8 null_bit
Definition: myisam.h:233
Definition: myisam.h:156
ulonglong data_file_length
Definition: myisam.h:161
uint16 language
Definition: myisam.h:164
ulonglong key_file_length
Definition: myisam.h:162
uint old_options
Definition: myisam.h:163
const char * index_file_name
Definition: myisam.h:157
bool with_auto_increment
Definition: myisam.h:165
ha_rows reloc_rows
Definition: myisam.h:159
const char * data_file_name
Definition: myisam.h:157
ha_rows max_rows
Definition: myisam.h:158
ulonglong auto_increment
Definition: myisam.h:160
Definition: myisam.h:214
uchar * intervalls
Definition: myisam.h:217
uint quick_table_bits
Definition: myisam.h:216
uint16 * table
Definition: myisam.h:215
Definition: myisamdef.h:252
Definition: myisam.h:129
char * data_file_name
Definition: myisam.h:142
uint keys
Definition: myisam.h:143
my_off_t max_index_file_length
Definition: myisam.h:136
time_t create_time
Definition: myisam.h:148
ulonglong key_map
Definition: myisam.h:141
int sortkey
Definition: myisam.h:146
uint reflength
Definition: myisam.h:151
my_off_t newrecpos
Definition: myisam.h:133
my_off_t recpos
Definition: myisam.h:132
ulong reclength
Definition: myisam.h:138
my_off_t max_data_file_length
Definition: myisam.h:136
ulong record_offset
Definition: myisam.h:152
my_off_t data_file_length
Definition: myisam.h:135
ulonglong auto_increment
Definition: myisam.h:140
time_t update_time
Definition: myisam.h:150
ulong mean_reclength
Definition: myisam.h:139
ha_rows deleted
Definition: myisam.h:131
int errkey
Definition: myisam.h:145
ulong * rec_per_key
Definition: myisam.h:153
my_off_t index_file_length
Definition: myisam.h:136
char * index_file_name
Definition: myisam.h:142
ha_rows records
Definition: myisam.h:130
time_t check_time
Definition: myisam.h:149
File filenr
Definition: myisam.h:147
my_off_t delete_length
Definition: myisam.h:137
my_off_t dupp_key_pos
Definition: myisam.h:134
Definition: myisam.h:174
uint16 keysegs
Definition: myisam.h:176
MYISAM_SHARE * share
Definition: myisam.h:175
uint32 version
Definition: myisam.h:186
uint16 block_size_index
Definition: myisam.h:185
HA_KEYSEG * seg
Definition: myisam.h:189
uint16 block_length
Definition: myisam.h:180
uint16 flag
Definition: myisam.h:177
int(* pack_key)(MI_KEYDEF *keyinfo, uint nod_flag, const uchar *next_key, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
Definition: myisam.h:195
int(* bin_search)(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, bool *was_last_key)
Definition: myisam.h:191
struct st_mysql_ftparser * parser
Definition: myisam.h:190
uint16 minlength
Definition: myisam.h:183
HA_KEYSEG * end
Definition: myisam.h:189
int(* ck_delete)(MI_INFO *inf, uint k_nr, uchar *k, uint klen)
Definition: myisam.h:200
uint32 ftkey_nr
Definition: myisam.h:187
uint8 key_alg
Definition: myisam.h:179
uint16 underflow_block_length
Definition: myisam.h:181
uint16 maxlength
Definition: myisam.h:184
int(* ck_insert)(MI_INFO *inf, uint k_nr, uchar *k, uint klen)
Definition: myisam.h:199
uint(* get_key)(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key)
Definition: myisam.h:194
uint16 keylength
Definition: myisam.h:182
Definition: myisamdef.h:521
Definition: myisam.h:206
uchar key
Definition: myisam.h:208
HA_KEYSEG * seg
Definition: myisam.h:210
uint16 keysegs
Definition: myisam.h:207
HA_KEYSEG * end
Definition: myisam.h:210
uint8 null_are_equal
Definition: myisam.h:209
Definition: myisamdef.h:177
Definition: my_sys.h:311
Definition: myisam.h:384
uchar * end
Definition: myisam.h:385
uchar * buf
Definition: myisam.h:385
int count
Definition: myisam.h:386
uchar lastkey[MI_MAX_KEY_BUFF]
Definition: myisam.h:387
Definition: myisam.h:390
SORT_FT_BUF * ft_buf
Definition: myisam.h:400
SORT_KEY_BLOCKS * key_block
Definition: myisam.h:399
MI_INFO * info
Definition: myisam.h:396
my_off_t filelength
Definition: myisam.h:391
uchar * buff
Definition: myisam.h:398
uint current_key
Definition: myisam.h:393
myf myf_rw
Definition: myisam.h:394
my_off_t dupp
Definition: myisam.h:391
uint total_keys
Definition: myisam.h:393
SORT_KEY_BLOCKS * key_block_end
Definition: myisam.h:399
ha_rows max_records
Definition: myisam.h:392
my_off_t buff_length
Definition: myisam.h:391
data_file_type new_data_file_type
Definition: myisam.h:395
MI_CHECK * param
Definition: myisam.h:397
Definition: myisam.h:322
uchar * end_pos
Definition: myisam.h:323
uint last_length
Definition: myisam.h:325
uchar * buff
Definition: myisam.h:323
uchar lastkey[MI_MAX_POSSIBLE_KEY_BUFF]
Definition: myisam.h:324
int inited
Definition: myisam.h:326
Definition: my_base.h:1124
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: keycache.h:50
Definition: plugin_ftparser.h:212
Include file for Sun RPC to compile out of the box.
unsigned int uint
Definition: uca9-dump.cc:75
static uint64_t cache_size
Definition: xcom_cache.cc:362