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