MySQL 9.1.0
Source Code Documentation
myisamdef.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/* This file is included by all internal myisam files */
26
27/**
28 @file storage/myisam/myisamdef.h
29*/
30
31#ifndef STORAGE_MYISAM_MYISAMDEF_INCLUDED
32#define STORAGE_MYISAM_MYISAMDEF_INCLUDED 1
33
34#include "my_alloc.h"
35#include "my_checksum.h" // ha_checksum
36#include "my_icp.h"
37#include "my_inttypes.h"
39#include "myisam.h" /* Structs & some defines */
40#include "myisampack.h" /* packing of keys */
45#include "thr_lock.h"
46
47struct HA_KEYSEG;
48struct KEY_CACHE;
49struct MI_INFO;
51struct TREE;
53
54/* undef map from my_nosys; We need test-if-disk full */
55#if defined(my_write)
56#undef my_write
57#endif
58
60 ha_rows records; /* Rows in table */
61 ha_rows del; /* Removed rows */
62 my_off_t empty; /* lost space in datafile */
63 my_off_t key_empty; /* lost space in indexfile */
67 bool uncacheable; /* Active concurrent insert */
68};
69
71 struct { /* Fileheader */
78 uchar key_parts[2]; /* Key parts */
79 uchar unique_key_parts[2]; /* Key parts + unique parts */
80 uchar keys; /* number of keys in file */
81 uchar uniques; /* number of UNIQUE definitions */
82 uchar language; /* Language (collation) for indexes */
83 uchar max_block_size_index; /* max keyblock size */
85 uchar not_used; /* To align to 8 */
87
89 ha_rows split; /* number of split blocks */
90 my_off_t dellink; /* Link to next removed block */
92 ulong process; /* process that updated table last */
93 ulong unique; /* Unique number for this process */
94 ulong update_count; /* Updated for each write lock */
95 ulong status;
97 my_off_t *key_root; /* Start of key trees */
98 my_off_t *key_del; /* delete links for trees */
99 my_off_t rec_per_key_rows; /* Rows when calculating rec_per_key */
100
101 ulong sec_index_changed; /* Updated when new sec_index */
102 ulong sec_index_used; /* which extra index are in use */
103 ulonglong key_map; /* Which keys are in use */
104 ha_checksum checksum; /* Table checksum */
105 ulong version; /* timestamp of create */
106 time_t create_time; /* Time when created database */
107 time_t recover_time; /* Time for last recover */
108 time_t check_time; /* Time for last check */
109 uint sortkey; /* sorted by this key (not used) */
111 uint8 changed; /* Changed since myisamchk */
112
113 /* the following isn't saved on disk */
114 uint state_diff_length; /* Should be 0 */
115 uint state_length; /* Length of state header in file */
116 ulong *key_info;
117};
118
119#define MI_STATE_INFO_SIZE (24 + 14 * 8 + 7 * 4 + 2 * 2 + 8)
120#define MI_STATE_KEY_SIZE 8
121#define MI_STATE_KEYBLOCK_SIZE 8
122#define MI_STATE_KEYSEG_SIZE 4
123#define MI_STATE_EXTRA_SIZE \
124 ((MI_MAX_KEY + MI_MAX_KEY_BLOCK_SIZE) * MI_STATE_KEY_SIZE + \
125 MI_MAX_KEY * MI_MAX_KEY_SEG * MI_STATE_KEYSEG_SIZE)
126#define MI_KEYDEF_SIZE (2 + 5 * 2)
127#define MI_UNIQUEDEF_SIZE (2 + 1 + 1)
128#define HA_KEYSEG_SIZE (6 + 2 * 2 + 4 * 2)
129#define MI_COLUMNDEF_SIZE (2 * 3 + 1)
130#define MI_BASE_INFO_SIZE (5 * 8 + 8 * 4 + 4 + 4 * 2 + 16)
131#define MI_INDEX_BLOCK_MARGIN 16 /* Safety margin for .MYI tables */
132
134 my_off_t keystart; /* Start of keys */
138 ha_rows records, reloc; /* Create information */
139 ulong mean_row_length; /* Create information */
140 ulong reclength; /* length of unpacked record */
141 ulong pack_reclength; /* Length of full packed rec. */
143 ulong max_pack_length; /* Max possibly length of packed rec.*/
145 ulong fields, /* fields in table */
146 pack_fields; /* packed fields in table */
147 uint rec_reflength; /* = 2-8 */
148 uint key_reflength; /* = 2-8 */
149 uint keys; /* same as in state.header */
150 uint auto_key; /* Which key-1 is a auto key */
151 uint blobs; /* Number of blobs */
152 uint pack_bits; /* Length of packed bits */
153 uint max_key_block_length; /* Max block length */
154 uint max_key_length; /* Max key length */
155 /* Extra allocation when using dynamic record format */
158 /* The following are from the header */
160};
161
162/* Structs used intern in database */
163
164struct MI_BLOB /* Info of record */
165{
166 ulong offset; /* Offset to blob in record */
167 uint pack_length; /* Type of packed length */
168 ulong length; /* Calc:ed for each record */
169};
170
171struct MI_PACK {
175};
176
177#define MAX_NONMAPPED_INSERTS 1000
178
179struct MYISAM_SHARE { /* Shared between opens */
182 MI_KEYDEF ft2_keyinfo; /* Second-level ft-key definition */
183 MI_KEYDEF *keyinfo; /* Key definitions */
184 MI_UNIQUEDEF *uniqueinfo; /* unique definitions */
185 HA_KEYSEG *keyparts; /* key part info */
186 MI_COLUMNDEF *rec; /* Pointer to field information */
187 MI_PACK pack; /* Data about packed records */
188 MI_BLOB *blobs; /* Pointer to blobs */
189 LIST *in_use; /* List of threads using this table */
190 char *unique_file_name; /* realpath() of index file */
191 char *data_file_name, /* Resolved path names from symlinks */
193 uchar *file_map; /* mem-map of file if possible */
194 KEY_CACHE *key_cache; /* ref to the current key cache */
198 int (*write_record)(MI_INFO *, const uchar *);
199 int (*update_record)(MI_INFO *, my_off_t, const uchar *);
201 int (*read_rnd)(MI_INFO *, uchar *, my_off_t, bool);
202 int (*compare_record)(MI_INFO *, const uchar *);
203 /* Function to use for a row checksum. */
206 my_off_t pos);
207 size_t (*file_read)(MI_INFO *, uchar *, size_t, my_off_t, myf);
208 size_t (*file_write)(MI_INFO *, const uchar *, size_t, my_off_t, myf);
209 ulong this_process; /* processid */
210 ulong last_process; /* For table-change-check */
211 ulong last_version; /* Version on start */
212 ulong options; /* Options used */
213 ulong min_pack_length; /* These are used by packed data */
216 uint rec_reflength; /* rec_reflength in use now */
218 uint32 ftkeys; /* Number of full-text keys + 1 */
219 File kfile; /* Shared keyfile */
220 File data_file; /* Shared data file */
221 int mode; /* mode of file on open */
222 uint reopen; /* How many times reopened */
223 uint w_locks, r_locks, tot_locks; /* Number of read/write locks */
224 uint blocksize; /* blocksize of keyfile */
227 /* Below flag is needed to make log tables work with concurrent insert */
229
230 bool changed, /* If changed since lock */
231 global_changed, /* If changed since open */
233
235 mysql_mutex_t intern_lock; /* Locking for use with _locking */
238 uint nonmmaped_inserts; /* counter of writing in non-mmaped
239 area */
241};
242
243typedef uint mi_bit_type;
244
245struct MI_BIT_BUFF { /* Used for packing of record */
247 uint bits;
249 uint error;
250};
251
252typedef ICP_RESULT (*index_cond_func_t)(void *param);
253
254struct MI_INFO {
255 MYISAM_SHARE *s; /* Shared between open:s */
257 MI_BLOB *blobs; /* Pointer to blobs */
259 /* accumulate indexfile changes between write's */
261 DYNAMIC_ARRAY *ft1_to_ft2; /* used only in ft1->ft2 conversion */
262 MEM_ROOT ft_memroot; /* used by the parser */
263 MYSQL_FTPARSER_PARAM *ftparser_param; /* share info between init/deinit */
264 LIST in_use; /* Thread using this table */
265 char *filename; /* parameter to open filename */
266 uchar *buff, /* Temp area for key */
267 *lastkey, *lastkey2; /* Last used search key */
268
269 /* Key used in mi_rnext_same and filled by mi_rkey. */
271 uchar *first_mbr_key; /* Searhed spatial key */
272 uchar *rec_buff; /* Tempbuff for recordpack */
273 uchar *int_keypos, /* Save position for next/previous */
274 *int_maxpos; /* -""- */
275 uint int_nod_flag; /* -""- */
278 ulong this_unique; /* uniq filenumber or thread */
279 ulong last_unique; /* last unique number */
280 ulong this_loop; /* counter for this open */
281 ulong last_loop; /* last used counter */
282 my_off_t lastpos, /* Last record position */
283 nextpos; /* Position to next record */
285 my_off_t pos; /* Intern variable */
286 my_off_t last_keypage; /* Last key page read */
287 my_off_t last_search_keypage; /* Last keypage when searching */
289 ha_checksum checksum; /* Temp storage for row checksum */
290 /* QQ: the following two xxx_length fields should be removed,
291 as they are not compatible with parallel repair */
292 ulong packed_length, blob_length; /* Length of found, packed record */
293 int dfile; /* The datafile */
294 uint opt_flag; /* Optim. for space/speed */
295 uint update; /* If file changed since open */
296 int lastinx; /* Last used index */
297 uint lastkey_length; /* Length of key in lastkey */
298 uint last_rkey_length; /* Last length in mi_rkey() */
299 enum ha_rkey_function last_key_func; /* CONTAIN, OVERLAP, etc */
301 uint pack_key_length; /* For MYISAMMRG */
302 uint16 last_used_keyseg; /* For MyISAMMRG */
303 int errkey; /* Got last error on this key */
304 int lock_type; /* How database was locked */
305 int tmp_lock_type; /* When locked by readinfo */
306 uint data_changed; /* Somebody has changed data */
307 uint save_update; /* When using KEY_READ */
310 IO_CACHE rec_cache; /* When caching records */
311 uint preload_buff_size; /* When preloading indexes */
312 myf lock_wait; /* is 0 or MY_DONT_WAIT */
313 bool was_locked; /* Was locked in panic */
314 bool append_insert_at_end; /* Set if concurrent insert */
316 bool page_changed; /* If info->buff can't be used for rnext */
317 bool buff_used; /* If info->buff has to be reread for rnext */
318 uint8 once_flags; /* For MYISAMMRG */
319
320 /* Used in mi_rnext_same to fill rnext_same_key for the first time. */
322
323 index_cond_func_t index_cond_func; /* Index condition function */
324 void *index_cond_func_arg; /* parameter for the func */
325#ifdef _WIN32
326 bool owned_by_merge; /* This MyISAM table is part of a merge union */
327#endif
329 uchar *rtree_recursion_state; /* For RTREE */
331};
332
333struct BUFFPEK {
334 my_off_t file_pos; /* Where we are in the sort file */
335 uchar *base, *key; /* Key pointers */
336 ha_rows count; /* Number of rows in table */
337 ulong mem_count; /* numbers of keys in memory */
338 ulong max_keys; /* Max keys in buffert */
339};
340
344 MI_BIT_BUFF bit_buff; /* For sort repair of packrec. */
345
346 /*
347 The next two are used to collect statistics, see update_key_parts for
348 description.
349 */
353
358 bool calc_checksum; /* calculate table checksum */
368 int (*key_cmp)(void *, uchar *, uchar *);
369 int (*key_read)(MI_SORT_PARAM *, void *);
370 int (*key_write)(MI_SORT_PARAM *, const void *);
371 int (*write_keys)(MI_SORT_PARAM *, uchar **, uint, BUFFPEK *, IO_CACHE *);
372 uint (*read_to_buffer)(IO_CACHE *, BUFFPEK *, uint);
373 int (*write_key)(MI_SORT_PARAM *, IO_CACHE *, uchar *, uint, uint);
374};
375
376/* Some defines used by isam-funktions */
377
378#define USE_WHOLE_KEY MI_MAX_KEY_BUFF * 2 /* Use whole key in _mi_search() */
379#define F_EXTRA_LCK -1
380
381/* bits in opt_flag */
382#define MEMMAP_USED 32
383#define REMEMBER_OLD_POS 64
384
385#define WRITEINFO_UPDATE_KEYFILE 1
386#define WRITEINFO_NO_UNLOCK 2
387
388/* once_flags */
389#define USE_PACKED_KEYS 1
390#define RRND_PRESERVE_LASTINX 2
391
392/* bits in state.changed */
393
394#define STATE_CHANGED 1
395#define STATE_CRASHED 2
396#define STATE_CRASHED_ON_REPAIR 4
397#define STATE_NOT_ANALYZED 8
398#define STATE_NOT_OPTIMIZED_KEYS 16
399#define STATE_NOT_SORTED_PAGES 32
400
401/* options to mi_read_cache */
402
403#define READING_NEXT 1
404#define READING_HEADER 2
405
406#define mi_getint(x) ((uint)mi_uint2korr(x) & 32767)
407#define mi_putint(x, y, nod) \
408 { \
409 uint16 boh = (nod ? (uint16)32768 : 0) + (uint16)(y); \
410 mi_int2store(x, boh); \
411 }
412#define mi_test_if_nod(x) (x[0] & 128 ? info->s->base.key_reflength : 0)
413#define mi_report_crashed(A, B) _mi_report_crashed((A), (B), __FILE__, __LINE__)
414#define mi_mark_crashed(x) \
415 do { \
416 (x)->s->state.changed |= STATE_CRASHED; \
417 DBUG_PRINT("error", ("Marked table crashed")); \
418 mi_report_crashed((x), nullptr); \
419 } while (0)
420#define mi_mark_crashed_on_repair(x) \
421 do { \
422 (x)->s->state.changed |= STATE_CRASHED | STATE_CRASHED_ON_REPAIR; \
423 (x)->update |= HA_STATE_CHANGED; \
424 DBUG_PRINT("error", ("Marked table crashed")); \
425 } while (0)
426#define mi_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED)
427#define mi_is_crashed_on_repair(x) \
428 ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
429#define mi_print_error(SHARE, ERRNO) \
430 mi_report_error((ERRNO), (SHARE)->index_file_name)
431
432/* Functions to store length of space packed keys, VARCHAR or BLOB keys */
433
434#define store_key_length(key, length) \
435 { \
436 if ((length) < 255) { \
437 *(key) = (length); \
438 } else { \
439 *(key) = 255; \
440 mi_int2store((key) + 1, (length)); \
441 } \
442 }
443
444#define get_key_full_length(length, key) \
445 { \
446 if ((uchar) * (key) != 255) \
447 length = ((uint)(uchar) * ((key)++)) + 1; \
448 else { \
449 length = mi_uint2korr((key) + 1) + 3; \
450 (key) += 3; \
451 } \
452 }
453
454#define get_key_full_length_rdonly(length, key) \
455 { \
456 if ((uchar) * (key) != 255) \
457 length = ((uint)(uchar) * ((key))) + 1; \
458 else { \
459 length = mi_uint2korr((key) + 1) + 3; \
460 } \
461 }
462
463#define get_pack_length(length) ((length) >= 255 ? 3 : 1)
464
465#define MI_MIN_BLOCK_LENGTH 20U /* Because of delete-link */
466#define MI_EXTEND_BLOCK_LENGTH 20 /* Don't use to small record-blocks */
467#define MI_SPLIT_LENGTH ((MI_EXTEND_BLOCK_LENGTH + 4) * 2)
468#define MI_MAX_DYN_BLOCK_HEADER 20 /* Max prefix of record-block */
469#define MI_BLOCK_INFO_HEADER_LENGTH 20
470#define MI_DYN_DELETE_BLOCK_HEADER 20 /* length of delete-block-header */
471#define MI_DYN_MAX_BLOCK_LENGTH ((1L << 24) - 4L)
472#define MI_DYN_MAX_ROW_LENGTH (MI_DYN_MAX_BLOCK_LENGTH - MI_SPLIT_LENGTH)
473#define MI_DYN_ALIGN_SIZE 4 /* Align blocks on this */
474#define MI_MAX_DYN_HEADER_BYTE 13 /* max header byte for dynamic rows */
475#define MI_MAX_BLOCK_LENGTH \
476 ((((ulong)1 << 24) - 1) & (~(ulong)(MI_DYN_ALIGN_SIZE - 1)))
477#define MI_REC_BUFF_OFFSET \
478 ALIGN_SIZE(MI_DYN_DELETE_BLOCK_HEADER + sizeof(uint32))
479
480#define PACK_TYPE_SELECTED 1 /* Bits in field->pack_type */
481#define PACK_TYPE_SPACE_FIELDS 2
482#define PACK_TYPE_ZERO_FILL 4
483#define MI_FOUND_WRONG_KEY 32738 /* Impossible value from ha_key_cmp */
484
485#define MI_MAX_KEY_BLOCK_SIZE \
486 (MI_MAX_KEY_BLOCK_LENGTH / MI_MIN_KEY_BLOCK_LENGTH)
487#define MI_BLOCK_SIZE(key_length, data_pointer, key_pointer, block_size) \
488 (((((key_length) + (data_pointer) + (key_pointer)) * 4 + (key_pointer) + \
489 2) / \
490 (block_size) + \
491 1) * \
492 (block_size))
493#define MI_MAX_KEYPTR_SIZE 5 /* For calculating block lengths */
494#define MI_MIN_KEYBLOCK_LENGTH 50 /* When to split delete blocks */
495
496#define MI_MIN_SIZE_BULK_INSERT_TREE 16384 /* this is per key */
497#define MI_MIN_ROWS_TO_USE_BULK_INSERT 100
498#define MI_MIN_ROWS_TO_DISABLE_INDEXES 100
499#define MI_MIN_ROWS_TO_USE_WRITE_CACHE 10
500
501/* The UNIQUE check is done with a hashed long key */
502
503#define MI_UNIQUE_HASH_TYPE HA_KEYTYPE_ULONG_INT
504#define mi_unique_store(A, B) mi_int4store((A), (B))
505
507
508#ifdef __cplusplus
509extern "C" {
510#endif
511
512/* Some extern variables */
513
514extern LIST *myisam_open_list;
517extern uint myisam_quick_table_bits;
518extern File myisam_log_file;
519extern ulong myisam_pid;
520
521/* This is used by _mi_calc_xxx_key_length och _mi_store_key */
522
526 const uchar *key;
529};
530
531/* Prototypes for intern functions */
532
533extern int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *buf);
534extern int _mi_write_dynamic_record(MI_INFO *, const uchar *);
535extern int _mi_update_dynamic_record(MI_INFO *, my_off_t, const uchar *);
536extern int _mi_delete_dynamic_record(MI_INFO *info);
537extern int _mi_cmp_dynamic_record(MI_INFO *info, const uchar *record);
538extern int _mi_read_rnd_dynamic_record(MI_INFO *, uchar *, my_off_t, bool);
539extern int _mi_write_blob_record(MI_INFO *, const uchar *);
540extern int _mi_update_blob_record(MI_INFO *, my_off_t, const uchar *);
541extern int _mi_read_static_record(MI_INFO *info, my_off_t filepos, uchar *buf);
542extern int _mi_write_static_record(MI_INFO *, const uchar *);
543extern int _mi_update_static_record(MI_INFO *, my_off_t, const uchar *);
544extern int _mi_delete_static_record(MI_INFO *info);
545extern int _mi_cmp_static_record(MI_INFO *info, const uchar *record);
546extern int _mi_read_rnd_static_record(MI_INFO *, uchar *, my_off_t, bool);
547extern int _mi_ck_write(MI_INFO *info, uint keynr, uchar *key, uint length);
548extern int _mi_ck_real_write_btree(MI_INFO *info, MI_KEYDEF *keyinfo,
549 uchar *key, uint key_length, my_off_t *root,
550 uint comp_flag);
551extern int _mi_enlarge_root(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
552 my_off_t *root);
553extern int _mi_insert(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
554 uchar *anc_buff, uchar *key_pos, uchar *key_buff,
555 uchar *father_buff, uchar *father_keypos,
556 my_off_t father_page, bool insert_last);
557extern int _mi_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
558 uchar *buff, uchar *key_buff, bool insert_last);
559extern uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page,
560 uchar *key, uint *return_key_length,
561 uchar **after_key);
562extern int _mi_calc_static_key_length(MI_KEYDEF *keyinfo, uint nod_flag,
563 const uchar *key_pos, uchar *org_key,
564 uchar *key_buff, const uchar *key,
565 MI_KEY_PARAM *s_temp);
566extern int _mi_calc_var_key_length(MI_KEYDEF *keyinfo, uint nod_flag,
567 const uchar *key_pos, uchar *org_key,
568 uchar *key_buff, const uchar *key,
569 MI_KEY_PARAM *s_temp);
570extern int _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo, uint nod_flag,
571 const uchar *key_pos, uchar *org_key,
572 uchar *prev_key, const uchar *key,
573 MI_KEY_PARAM *s_temp);
574extern int _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo, uint nod_flag,
575 const uchar *key_pos, uchar *org_key,
576 uchar *prev_key, const uchar *key,
577 MI_KEY_PARAM *s_temp);
578void _mi_store_static_key(MI_KEYDEF *keyinfo, uchar *key_pos,
579 MI_KEY_PARAM *s_temp);
580void _mi_store_var_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos,
581 MI_KEY_PARAM *s_temp);
582void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos,
583 MI_KEY_PARAM *s_temp);
584
585extern int _mi_ck_delete(MI_INFO *info, uint keynr, uchar *key,
586 uint key_length);
587extern int _mi_readinfo(MI_INFO *info, int lock_flag, int check_keybuffer);
588extern int _mi_writeinfo(MI_INFO *info, uint options);
589extern int _mi_test_if_changed(MI_INFO *info);
590extern int _mi_mark_file_changed(MI_INFO *info);
591extern int _mi_decrement_open_count(MI_INFO *info);
592extern int _mi_check_index(MI_INFO *info, int inx);
593extern int _mi_search(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
594 uint key_len, uint nextflag, my_off_t pos);
595extern int _mi_bin_search(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
596 uchar *key, uint key_len, uint comp_flag,
597 uchar **ret_pos, uchar *buff, bool *was_last_key);
598extern int _mi_seq_search(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
599 uchar *key, uint key_len, uint comp_flag,
600 uchar **ret_pos, uchar *buff, bool *was_last_key);
601extern int _mi_prefix_search(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
602 uchar *key, uint key_len, uint comp_flag,
603 uchar **ret_pos, uchar *buff, bool *was_last_key);
604extern my_off_t _mi_kpos(uint nod_flag, uchar *after_key);
605extern void _mi_kpointer(MI_INFO *info, uchar *buff, my_off_t pos);
606extern my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, const uchar *after_key);
607extern my_off_t _mi_rec_pos(MYISAM_SHARE *info, uchar *ptr);
608extern void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos);
609extern uint _mi_get_static_key(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page,
610 uchar *key);
611extern uint _mi_get_pack_key(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page,
612 uchar *key);
613extern uint _mi_get_binary_pack_key(MI_KEYDEF *keyinfo, uint nod_flag,
614 uchar **page_pos, uchar *key);
615extern uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *keypos,
616 uchar *lastkey, uchar *endpos,
617 uint *return_key_length);
618extern uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
619 uchar *key, uchar *keypos, uint *return_key_length);
620extern uint _mi_keylength(MI_KEYDEF *keyinfo, const uchar *key);
621extern uint _mi_keylength_part(MI_KEYDEF *keyinfo, const uchar *key,
622 HA_KEYSEG *end);
623extern uchar *_mi_move_key(MI_KEYDEF *keyinfo, uchar *to, const uchar *from);
624extern int _mi_search_next(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
625 uint key_length, uint nextflag, my_off_t pos);
626extern int _mi_search_first(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos);
627extern int _mi_search_last(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos);
628extern uchar *_mi_fetch_keypage(MI_INFO *info, MI_KEYDEF *keyinfo,
629 my_off_t page, int level, uchar *buff,
630 int return_buffer);
631extern int _mi_write_keypage(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t page,
632 int level, uchar *buff);
633extern int _mi_dispose(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos,
634 int level);
635extern my_off_t _mi_new(MI_INFO *info, MI_KEYDEF *keyinfo, int level);
636extern uint _mi_make_key(MI_INFO *info, uint keynr, uchar *key,
637 const uchar *record, my_off_t filepos);
638extern uint _mi_pack_key(MI_INFO *info, uint keynr, uchar *key,
639 const uchar *old, key_part_map keypart_map,
640 HA_KEYSEG **last_used_keyseg);
641extern int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf);
642extern int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos,
643 uint length, int re_read_if_possibly);
645
646extern uchar *mi_alloc_rec_buff(MI_INFO *, ulong, uchar **);
647#define mi_get_rec_buff_ptr(info, buf) \
648 ((((info)->s->options & HA_OPTION_PACK_RECORD) && (buf)) \
649 ? (buf)-MI_REC_BUFF_OFFSET \
650 : (buf))
651#define mi_get_rec_buff_len(info, buf) \
652 (*((uint32 *)(mi_get_rec_buff_ptr(info, buf))))
653
654extern size_t _mi_rec_unpack(MI_INFO *info, uchar *to, const uchar *from,
655 ulong reclength);
656extern bool _mi_rec_check(MI_INFO *info, const uchar *record, uchar *packpos,
657 ulong packed_length, bool with_checkum);
658extern int _mi_write_part_record(MI_INFO *info, my_off_t filepos, ulong length,
659 my_off_t next_filepos, uchar **record,
660 ulong *reclength, int *flag);
661extern void _mi_print_key(FILE *stream, HA_KEYSEG *keyseg, const uchar *key,
662 uint length);
663extern bool _mi_read_pack_info(MI_INFO *info, bool fix_keys);
664extern int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, uchar *buf);
665extern int _mi_read_rnd_pack_record(MI_INFO *, uchar *, my_off_t, bool);
666extern int _mi_pack_rec_unpack(MI_INFO *info, MI_BIT_BUFF *bit_buff, uchar *to,
667 uchar *from, ulong reclength);
669extern int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf,
670 const uchar *oldrec, const uchar *newrec,
671 my_off_t pos);
672
673#ifdef __cplusplus
674}
675#endif
676
677struct MI_BLOCK_INFO { /* Parameter to _mi_get_block_info */
679 ulong rec_len;
680 ulong data_len;
682 ulong blob_len;
687 uint offset;
688};
689
690/* bits in return from _mi_get_block_info */
691
692#define BLOCK_FIRST 1
693#define BLOCK_LAST 2
694#define BLOCK_DELETED 4
695#define BLOCK_ERROR 8 /* Wrong data */
696#define BLOCK_SYNC_ERROR 16 /* Right data at wrong place */
697#define BLOCK_FATAL_ERROR 32 /* hardware-error */
698
699#define NEED_MEM \
700 ((uint)10 * 4 * (IO_SIZE + 32) + 32) /* Needed for recursion \
701 */
702#define MAXERR 20
703#define BUFFERS_WHEN_SORTING 16 /* Alloc for sort-key-tree */
704#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
705#define WRITE_COUNT MY_HOW_OFTEN_TO_WRITE
706#define INDEX_TMP_EXT ".TMM"
707#define DATA_TMP_EXT ".TMD"
709#define UPDATE_TIME 1
710#define UPDATE_STAT 2
711#define UPDATE_SORT 4
712#define UPDATE_AUTO_INC 8
713#define UPDATE_OPEN_COUNT 16
715#define USE_BUFFER_INIT (((1024L * 512L - MALLOC_OVERHEAD) / IO_SIZE) * IO_SIZE)
716#define READ_BUFFER_INIT (1024L * 256L - MALLOC_OVERHEAD)
717#define SORT_BUFFER_INIT (2048L * 1024L - MALLOC_OVERHEAD)
718#define MIN_SORT_BUFFER (4096ULL - MALLOC_OVERHEAD)
729};
731#define myisam_log(a, b, c, d) \
732 if (myisam_log_file >= 0) _myisam_log(a, b, c, d)
733#define myisam_log_command(a, b, c, d, e) \
734 if (myisam_log_file >= 0) _myisam_log_command(a, b, c, d, e)
735#define myisam_log_record(a, b, c, d, e) \
736 if (myisam_log_file >= 0) _myisam_log_record(a, b, c, d, e)
738#define fast_mi_writeinfo(INFO) \
739 if (!(INFO)->s->tot_locks) (void)_mi_writeinfo((INFO), 0)
740#define fast_mi_readinfo(INFO) \
741 ((INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO), F_RDLCK, 1)
742
743#ifdef __cplusplus
744extern "C" {
745#endif
746
748extern uint _mi_rec_pack(MI_INFO *info, uchar *to, const uchar *from);
749extern uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff,
750 MI_BLOCK_INFO *info, uchar **rec_buff_p,
751 File file, my_off_t filepos);
752extern void _mi_store_blob_length(uchar *pos, uint pack_length, uint length);
753extern void _myisam_log(enum myisam_log_commands command, MI_INFO *info,
754 const uchar *buffert, uint length);
756 const uchar *buffert, uint length, int result);
758 const uchar *record, my_off_t filepos,
759 int result);
760extern void mi_report_error(int errcode, const char *file_name);
761extern bool _mi_memmap_file(MI_INFO *info);
762extern void _mi_unmap_file(MI_INFO *info);
763extern uint save_pack_length(uint version, uchar *block_buff, ulong length);
764extern uint read_pack_length(uint version, const uchar *buf, ulong *length);
765extern uint calc_pack_length(uint version, ulong length);
766extern size_t mi_mmap_pread(MI_INFO *info, uchar *Buffer, size_t Count,
767 my_off_t offset, myf MyFlags);
768extern size_t mi_mmap_pwrite(MI_INFO *info, const uchar *Buffer, size_t Count,
769 my_off_t offset, myf MyFlags);
770extern size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer, size_t Count,
771 my_off_t offset, myf MyFlags);
772extern size_t mi_nommap_pwrite(MI_INFO *info, const uchar *Buffer, size_t Count,
773 my_off_t offset, myf MyFlags);
774
775uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite);
777uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, bool pRead);
780int mi_keyseg_write(File file, const HA_KEYSEG *keyseg);
781uchar *mi_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg);
782uint mi_keydef_write(File file, MI_KEYDEF *keydef);
783uchar *mi_keydef_read(uchar *ptr, MI_KEYDEF *keydef);
786uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo);
787uchar *mi_recinfo_read(uchar *ptr, MI_COLUMNDEF *recinfo);
788extern int mi_disable_indexes(MI_INFO *info);
789extern int mi_enable_indexes(MI_INFO *info);
790extern int mi_indexes_are_disabled(MI_INFO *info);
795 ha_checksum unique_hash, my_off_t pos);
798 my_off_t pos);
800 const uchar *record, my_off_t pos);
801int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
802 bool null_are_equal);
803void mi_get_status(void *param, int concurrent_insert);
804void mi_update_status(void *param);
805void mi_restore_status(void *param);
806void mi_copy_status(void *to, void *from);
807bool mi_check_status(void *param);
808
810bool check_table_is_closed(const char *name, const char *where);
811int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *orn_name,
812 File file_to_dup);
813
814int mi_open_keyfile(MYISAM_SHARE *share);
817int mi_munmap_file(MI_INFO *info);
819void _mi_report_crashed(MI_INFO *file, const char *message, const char *sfile,
820 uint sline);
821
822int mi_check_index_cond(MI_INFO *info, uint keynr, uchar *record);
823
824/* Functions needed by mi_check */
825volatile int *killed_ptr(MI_CHECK *param);
826void mi_check_print_error(MI_CHECK *param, const char *fmt, ...)
827 MY_ATTRIBUTE((format(printf, 2, 3)));
828void mi_check_print_warning(MI_CHECK *param, const char *fmt, ...)
829 MY_ATTRIBUTE((format(printf, 2, 3)));
830void mi_check_print_info(MI_CHECK *param, const char *fmt, ...)
831 MY_ATTRIBUTE((format(printf, 2, 3)));
833int sort_ft_buf_flush(MI_SORT_PARAM *sort_param);
834int flush_blocks(MI_CHECK *param, KEY_CACHE *key_cache, File file);
835
836int sort_write_record(MI_SORT_PARAM *sort_param);
837int _create_index_by_sort(MI_SORT_PARAM *info, bool no_messages, ulonglong);
838
839extern void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t func,
840 void *func_arg);
841
842#ifdef __cplusplus
843extern thread_local st_keycache_thread_var *keycache_tls;
844}
845#endif
846
847#ifdef HAVE_PSI_INTERFACE
849
852
858
860
862#endif /* HAVE_PSI_INTERFACE */
863
886
887#endif // STORAGE_MYISAM_MYISAMDEF_INCLUDED
int page
Definition: ctype-mb.cc:1224
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:44
unsigned int PSI_file_key
Instrumented file key.
Definition: psi_file_bits.h:48
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:52
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:44
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:50
static int flag
Definition: hp_test1.cc:40
static int reclength
Definition: hp_test2.cc:52
Instrumentation helpers for mysys threads.
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
data_file_type
Definition: my_base.h:1070
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1008
my_off_t ha_rows
Definition: my_base.h:1141
Abstraction functions over zlib/intrinsics.
std::uint32_t ha_checksum
Definition: my_checksum.h:106
enum icp_result ICP_RESULT
Values returned by index_cond_func_xxx functions.
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
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
int File
Definition: my_io_bits.h:51
Some macros for dealing with pointer arithmetic, e.g., aligning of buffers to a given size.
This file should be included when using myisam functions.
#define MI_MAX_KEY_SEG
Definition: myisam.h:64
void _mi_print_key(FILE *stream, HA_KEYSEG *keyseg, const uchar *key, uint length)
Definition: mi_dbug.cc:35
uint myisam_quick_table_bits
Definition: mi_static.cc:57
PSI_memory_key mi_key_memory_ft_stopwords
Definition: mi_static.cc:107
size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
Definition: mi_dynrec.cc:194
int _mi_decrement_open_count(MI_INFO *info)
Definition: mi_locking.cc:501
int flush_pending_blocks(MI_SORT_PARAM *param)
Definition: mi_check.cc:3245
ulong myisam_pid
Definition: mi_log.cc:48
int mi_munmap_file(MI_INFO *info)
Definition: mi_dynrec.cc:125
uint mi_uniquedef_write(File file, MI_UNIQUEDEF *keydef)
Definition: mi_open.cc:1175
PSI_memory_key mi_key_memory_FTPARSER_PARAM
Definition: mi_static.cc:105
int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos, uint length, int re_read_if_possibly)
Definition: mi_cache.cc:53
void init_myisam_psi_keys()
Definition: mi_static.cc:203
uint _mi_get_block_info(MI_BLOCK_INFO *, File, my_off_t)
Definition: mi_dynrec.cc:1642
myisam_log_commands
Definition: myisamdef.h:719
@ MI_LOG_EXTRA
Definition: myisamdef.h:725
@ MI_LOG_UPDATE
Definition: myisamdef.h:722
@ MI_LOG_DELETE_ALL
Definition: myisamdef.h:727
@ MI_LOG_DELETE
Definition: myisamdef.h:723
@ MI_LOG_OPEN
Definition: myisamdef.h:720
@ MI_LOG_LOCK
Definition: myisamdef.h:726
@ MI_LOG_WRITE
Definition: myisamdef.h:721
@ MI_LOG_CLOSE
Definition: myisamdef.h:724
int flush_blocks(MI_CHECK *param, KEY_CACHE *key_cache, File file)
Definition: mi_check.cc:1739
void _myisam_log_record(enum myisam_log_commands command, MI_INFO *info, const uchar *record, my_off_t filepos, int result)
Definition: mi_log.cc:116
PSI_file_key mi_key_file_kfile
Definition: myisamdef.h:855
int _mi_update_static_record(MI_INFO *, my_off_t, const uchar *)
Definition: mi_statrec.cc:88
uchar * mi_recinfo_read(uchar *ptr, MI_COLUMNDEF *recinfo)
Definition: mi_open.cc:1212
size_t mi_nommap_pwrite(MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
Definition: mi_dynrec.cc:240
thread_local st_keycache_thread_var * keycache_tls
Definition: mi_static.cc:69
PSI_file_key mi_key_file_datatmp
Definition: mi_static.cc:148
int _mi_pack_rec_unpack(MI_INFO *info, MI_BIT_BUFF *bit_buff, uchar *to, uchar *from, ulong reclength)
Definition: mi_packrec.cc:700
ha_checksum mi_checksum(MI_INFO *info, const uchar *buf)
Definition: mi_checksum.cc:33
uchar * _mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *keypos, uchar *lastkey, uchar *endpos, uint *return_key_length)
Definition: mi_search.cc:1010
PSI_memory_key mi_key_memory_MI_INFO_bulk_insert
Definition: mi_static.cc:101
void _mi_store_var_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1643
bool _mi_memmap_file(MI_INFO *info)
Definition: mi_packrec.cc:1339
my_off_t _mi_kpos(uint nod_flag, uchar *after_key)
Definition: mi_search.cc:515
bool _mi_read_pack_info(MI_INFO *info, bool fix_keys)
Definition: mi_packrec.cc:154
int _mi_enlarge_root(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, my_off_t *root)
Definition: mi_write.cc:265
bool _mi_rec_check(MI_INFO *info, const uchar *record, uchar *packpos, ulong packed_length, bool with_checkum)
Definition: mi_dynrec.cc:955
PSI_memory_key mi_key_memory_FT_INFO
Definition: mi_static.cc:104
PSI_memory_key mi_key_memory_SORT_INFO_buffer
Definition: mi_static.cc:113
uint myisam_read_vec[]
Definition: mi_static.cc:80
PSI_mutex_key mi_key_mutex_MYISAM_SHARE_intern_lock
Definition: mi_static.cc:121
uint mi_base_info_write(File file, MI_BASE_INFO *base)
Definition: mi_open.cc:974
PSI_memory_key mi_key_memory_stPageList_pages
Definition: mi_static.cc:117
PSI_memory_key mi_key_memory_preload_buffer
Definition: mi_static.cc:116
int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b, bool null_are_equal)
Definition: mi_unique.cc:143
void mi_restore_status(void *param)
Definition: mi_locking.cc:319
int _mi_read_rnd_dynamic_record(MI_INFO *, uchar *, my_off_t, bool)
Definition: mi_dynrec.cc:1481
int _mi_update_dynamic_record(MI_INFO *, my_off_t, const uchar *)
Definition: mi_dynrec.cc:250
int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *orn_name, File file_to_dup)
Definition: mi_open.cc:1232
int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *oldrec, const uchar *newrec, my_off_t pos)
Definition: ft_update.cc:189
uchar * mi_state_info_read(uchar *ptr, MI_STATE_INFO *state)
Definition: mi_open.cc:882
void mi_check_print_warning(MI_CHECK *param, const char *fmt,...)
Definition: ha_myisam.cc:580
PSI_memory_key mi_key_memory_MI_SORT_PARAM_wordroot
Definition: mi_static.cc:109
int mi_check_index_cond(MI_INFO *info, uint keynr, uchar *record)
Definition: mi_key.cc:422
PSI_memory_key mi_key_memory_record_buffer
Definition: mi_static.cc:102
mysql_mutex_t THR_LOCK_myisam
Definition: my_thr_init.cc:73
uchar * my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base)
Definition: mi_open.cc:1023
void _myisam_log_command(enum myisam_log_commands command, MI_INFO *info, const uchar *buffert, uint length, int result)
Definition: mi_log.cc:96
uchar * mi_uniquedef_read(uchar *ptr, MI_UNIQUEDEF *keydef)
Definition: mi_open.cc:1187
void _mi_unmap_file(MI_INFO *info)
Definition: mi_packrec.cc:1387
int mi_open_keyfile(MYISAM_SHARE *share)
Definition: mi_open.cc:1262
uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo)
Definition: mi_open.cc:1198
uchar * _mi_fetch_keypage(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff, int return_buffer)
Definition: mi_page.cc:37
void _mi_store_static_key(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1626
int _mi_write_part_record(MI_INFO *info, my_off_t filepos, ulong length, my_off_t next_filepos, uchar **record, ulong *reclength, int *flag)
Definition: mi_dynrec.cc:544
void _mi_report_crashed(MI_INFO *file, const char *message, const char *sfile, uint sline)
Report list of threads (and queries) accessing a table, thread_id of a thread that detected corruptio...
Definition: ha_myisam.cc:602
void _mi_store_blob_length(uchar *pos, uint pack_length, uint length)
Definition: mi_dynrec.cc:1182
int _mi_read_rnd_static_record(MI_INFO *, uchar *, my_off_t, bool)
Definition: mi_statrec.cc:174
void _mi_kpointer(MI_INFO *info, uchar *buff, my_off_t pos)
Definition: mi_search.cc:540
int _mi_ck_write(MI_INFO *info, uint keynr, uchar *key, uint length)
Definition: mi_write.cc:210
PSI_memory_key mi_key_memory_SORT_FT_BUF
Definition: mi_static.cc:110
void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos)
Definition: mi_search.cc:651
PSI_memory_key mi_key_memory_keycache_thread_var
Definition: mi_static.cc:118
int _mi_seq_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: mi_search.cc:240
#define MI_BLOCK_INFO_HEADER_LENGTH
Definition: myisamdef.h:469
uchar myisam_file_magic[]
Definition: mi_static.cc:43
int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, uchar *buf)
Definition: mi_packrec.cc:677
int _mi_write_blob_record(MI_INFO *, const uchar *)
Definition: mi_dynrec.cc:256
bool mi_dynmap_file(MI_INFO *info, my_off_t size)
Definition: mi_dynrec.cc:79
ulonglong mi_safe_mul(ulonglong a, ulonglong b)
Definition: mi_open.cc:695
uint myisam_readnext_vec[]
Definition: myisamdef.h:516
uint mi_bit_type
Definition: myisamdef.h:243
int _mi_update_blob_record(MI_INFO *, my_off_t, const uchar *)
Definition: mi_dynrec.cc:281
MI_INFO * test_if_reopen(char *filename)
Definition: mi_open.cc:82
uint _mi_get_binary_pack_key(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page_pos, uchar *key)
Definition: mi_search.cc:822
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg)
Definition: mi_open.cc:1120
void mi_setup_functions(MYISAM_SHARE *share)
Definition: mi_open.cc:704
PSI_memory_key mi_key_memory_MI_INFO_ft1_to_ft2
Definition: mi_static.cc:100
File myisam_log_file
Definition: mi_static.cc:56
int _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1551
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite)
Definition: mi_open.cc:797
PSI_memory_key key_memory_QUEUE
Definition: mi_static.cc:119
int _mi_readinfo(MI_INFO *info, int lock_flag, int check_keybuffer)
Definition: mi_locking.cc:369
PSI_memory_key mi_key_memory_MYISAM_SHARE_decode_tables
Definition: mi_static.cc:115
bool mi_check_status(void *param)
Definition: mi_locking.cc:350
int _mi_ck_real_write_btree(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, my_off_t *root, uint comp_flag)
Definition: mi_write.cc:250
PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_key_root_lock
Definition: mi_static.cc:129
int _mi_write_keypage(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff)
Definition: mi_page.cc:73
void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t func, void *func_arg)
Definition: mi_extra.cc:211
void mi_report_error(int errcode, const char *file_name)
Definition: mi_info.cc:125
int _mi_delete_dynamic_record(MI_INFO *info)
Definition: mi_dynrec.cc:303
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, const uchar *after_key)
Definition: mi_search.cc:571
uchar * mi_keydef_read(uchar *ptr, MI_KEYDEF *keydef)
Definition: mi_open.cc:1094
int _mi_calc_static_key_length(MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *key_buff, const uchar *key, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1265
void mi_check_print_info(MI_CHECK *param, const char *fmt,...)
Definition: ha_myisam.cc:573
int _mi_write_static_record(MI_INFO *, const uchar *)
Definition: mi_statrec.cc:35
uint _mi_pack_key(MI_INFO *info, uint keynr, uchar *key, const uchar *old, key_part_map keypart_map, HA_KEYSEG **last_used_keyseg)
Definition: mi_key.cc:197
void mi_remap_file(MI_INFO *info, my_off_t size)
Definition: mi_dynrec.cc:148
int _mi_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: mi_search.cc:181
int _mi_read_static_record(MI_INFO *info, my_off_t filepos, uchar *buf)
Definition: mi_statrec.cc:148
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, bool pRead)
Definition: mi_open.cc:956
int _mi_insert(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uchar *anc_buff, uchar *key_pos, uchar *key_buff, uchar *father_buff, uchar *father_keypos, my_off_t father_page, bool insert_last)
Definition: mi_write.cc:406
int _mi_cmp_static_record(MI_INFO *info, const uchar *record)
Definition: mi_statrec.cc:107
PSI_cond_key mi_key_cond_MI_SORT_INFO_cond
PSI_memory_key mi_key_memory_MI_DECODE_TREE
Definition: mi_static.cc:114
int _mi_write_dynamic_record(MI_INFO *, const uchar *)
Definition: mi_dynrec.cc:245
uint mi_keydef_write(File file, MI_KEYDEF *keydef)
Definition: mi_open.cc:1075
uchar * _mi_move_key(MI_KEYDEF *keyinfo, uchar *to, const uchar *from)
Definition: mi_search.cc:1092
uint _mi_get_pack_key(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key)
Definition: mi_search.cc:713
void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1691
int mi_disable_indexes(MI_INFO *info)
Definition: mi_open.cc:1284
int _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1304
ha_checksum mi_static_checksum(MI_INFO *info, const uchar *buf)
Definition: mi_checksum.cc:68
int sort_write_record(MI_SORT_PARAM *sort_param)
Definition: mi_check.cc:2810
my_off_t _mi_new(MI_INFO *info, MI_KEYDEF *keyinfo, int level)
Definition: mi_page.cc:120
ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const uchar *buf)
Definition: mi_unique.cc:84
void _myisam_log(enum myisam_log_commands command, MI_INFO *info, const uchar *buffert, uint length)
Definition: mi_log.cc:75
int _mi_dispose(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos, int level)
Definition: mi_page.cc:102
int _mi_read_rnd_pack_record(MI_INFO *, uchar *, my_off_t, bool)
Definition: mi_packrec.cc:1168
bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, uchar *record, ha_checksum unique_hash, my_off_t pos)
Definition: mi_unique.cc:37
int _mi_search_first(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos)
Definition: mi_search.cc:1176
void mi_copy_status(void *to, void *from)
Definition: mi_locking.cc:325
PSI_cond_key mi_keycache_thread_var_suspend
Definition: myisamdef.h:853
void mi_get_status(void *param, int concurrent_insert)
Definition: mi_locking.cc:262
int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos)
Definition: mi_dynrec.cc:1328
int _mi_cmp_dynamic_record(MI_INFO *info, const uchar *record)
Definition: mi_dynrec.cc:1354
PSI_thread_key mi_key_thread_find_all_keys
Definition: mi_static.cc:159
int mi_enable_indexes(MI_INFO *info)
Definition: mi_open.cc:1310
uint calc_pack_length(uint version, ulong length)
Definition: mi_packrec.cc:1510
PSI_memory_key mi_key_memory_FTB
Definition: mi_static.cc:103
my_off_t _mi_rec_pos(MYISAM_SHARE *info, uchar *ptr)
Definition: mi_search.cc:607
PSI_file_key mi_key_file_log
Definition: myisamdef.h:856
int sort_ft_buf_flush(MI_SORT_PARAM *sort_param)
Definition: mi_check.cc:2980
PSI_memory_key mi_key_memory_MYISAM_SHARE
Definition: mi_static.cc:98
bool check_table_is_closed(const char *name, const char *where)
ulonglong retrieve_auto_increment(MI_INFO *info, const uchar *record)
Definition: mi_key.cc:444
uint _mi_keylength_part(MI_KEYDEF *keyinfo, const uchar *key, HA_KEYSEG *end)
Definition: mi_search.cc:1074
size_t mi_mmap_pread(MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
Definition: mi_dynrec.cc:170
int _mi_search_last(MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos)
Definition: mi_search.cc:1215
uchar myisam_pack_file_magic[]
Definition: myisamdef.h:515
int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf)
Definition: mi_key.cc:388
uint save_pack_length(uint version, uchar *block_buff, ulong length)
Definition: mi_packrec.cc:1470
int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *buf)
Definition: mi_dynrec.cc:1233
int _mi_calc_var_key_length(MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *key_buff, const uchar *key, MI_KEY_PARAM *s_temp)
Definition: mi_search.cc:1276
uchar * mi_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg)
Definition: mi_open.cc:1144
int mi_indexes_are_disabled(MI_INFO *info)
Definition: mi_open.cc:1339
int _mi_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uchar *buff, uchar *key_buff, bool insert_last)
Definition: mi_write.cc:518
PSI_file_key mi_key_file_dfile
Definition: myisamdef.h:855
size_t mi_mmap_pwrite(MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
Definition: mi_dynrec.cc:215
PSI_memory_key mi_key_memory_ft_memroot
Definition: mi_static.cc:106
int _mi_prefix_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: mi_search.cc:278
LIST * myisam_open_list
Definition: mi_static.cc:42
int _mi_mark_file_changed(MI_INFO *info)
Definition: mi_locking.cc:474
ulong _my_calc_total_blob_length(MI_INFO *info, const uchar *record)
Definition: mi_dynrec.cc:1153
uchar * _mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length)
Definition: mi_search.cc:952
PSI_memory_key mi_key_memory_MI_INFO
Definition: mi_static.cc:99
size_t _mi_rec_unpack(MI_INFO *info, uchar *to, const uchar *from, ulong reclength)
Definition: mi_dynrec.cc:1046
int _mi_check_index(MI_INFO *info, int inx)
Definition: mi_search.cc:46
uint _mi_keylength(MI_KEYDEF *keyinfo, const uchar *key)
Definition: mi_search.cc:1046
int _mi_test_if_changed(MI_INFO *info)
Definition: mi_locking.cc:435
PSI_memory_key mi_key_memory_filecopy
Definition: mi_static.cc:112
PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_mmap_lock
Definition: myisamdef.h:850
int _create_index_by_sort(MI_SORT_PARAM *info, bool no_messages, ulonglong)
Definition: sort.cc:110
ICP_RESULT(* index_cond_func_t)(void *param)
Definition: myisamdef.h:252
PSI_memory_key mi_key_memory_MI_SORT_PARAM
Definition: mi_static.cc:108
volatile int * killed_ptr(MI_CHECK *param)
Definition: ha_myisam.cc:559
PSI_memory_key mi_key_memory_SORT_KEY_BLOCKS
Definition: mi_static.cc:111
uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, File file, my_off_t filepos)
Definition: mi_packrec.cc:1222
void mi_check_print_error(MI_CHECK *param, const char *fmt,...)
Definition: ha_myisam.cc:564
int _mi_cmp_static_unique(MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos)
Definition: mi_statrec.cc:132
int _mi_search_next(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uint nextflag, my_off_t pos)
Definition: mi_search.cc:1101
uint read_pack_length(uint version, const uchar *buf, ulong *length)
Definition: mi_packrec.cc:1492
uint _mi_make_key(MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos)
Definition: mi_key.cc:63
int _mi_delete_static_record(MI_INFO *info)
Definition: mi_statrec.cc:94
void mi_update_status(void *param)
Definition: mi_locking.cc:282
uint _mi_rec_pack(MI_INFO *info, uchar *to, const uchar *from)
Definition: mi_dynrec.cc:855
int _mi_ck_delete(MI_INFO *info, uint keynr, uchar *key, uint key_length)
Definition: mi_delete.cc:134
int _mi_writeinfo(MI_INFO *info, uint options)
Definition: mi_locking.cc:397
uchar * _mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint *return_key_length, uchar **after_key)
Definition: mi_write.cc:582
uchar * mi_alloc_rec_buff(MI_INFO *, ulong, uchar **)
Definition: mi_open.cc:661
int _mi_search(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_len, uint nextflag, my_off_t pos)
Definition: mi_search.cc:77
uint _mi_get_static_key(MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key)
Definition: mi_search.cc:692
Storing of values in high byte first order.
Instrumentation helpers for mysys file io.
static char * where
Definition: mysqldump.cc:152
static int record
Definition: mysqltest.cc:193
Definition: buf0block_hint.cc:30
const std::string FILE("FILE")
Definition: os0file.h:89
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
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94
size_t size(const char *const c)
Definition: base64.h:46
Definition: options.cc:57
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
const char * filename
Definition: pfs_example_component_population.cc:67
Instrumentation helpers for rwlock.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required uint64 version
Definition: replication_group_member_actions.proto:41
case opt name
Definition: sslopt-case.h:29
Definition: myisamdef.h:333
ulong mem_count
Definition: myisamdef.h:337
uchar * key
Definition: myisamdef.h:335
uchar * base
Definition: myisamdef.h:335
ha_rows count
Definition: myisamdef.h:336
my_off_t file_pos
Definition: myisamdef.h:334
ulong max_keys
Definition: myisamdef.h:338
Definition: array.h:30
Definition: my_compare.h:60
Definition: my_sys.h:334
Definition: keycache.h:73
Definition: my_list.h:36
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: myisamdef.h:133
uint all_key_parts
Definition: myisamdef.h:159
uint keys
Definition: myisamdef.h:149
uint key_reflength
Definition: myisamdef.h:148
uint rec_reflength
Definition: myisamdef.h:147
my_off_t margin_key_file_length
Definition: myisamdef.h:137
my_off_t keystart
Definition: myisamdef.h:134
uint max_key_block_length
Definition: myisamdef.h:153
ulong reclength
Definition: myisamdef.h:140
ha_rows records
Definition: myisamdef.h:138
uint pack_bits
Definition: myisamdef.h:152
ulong pack_reclength
Definition: myisamdef.h:141
ulong fields
Definition: myisamdef.h:145
ulong min_block_length
Definition: myisamdef.h:144
my_off_t max_key_file_length
Definition: myisamdef.h:136
uint key_parts
Definition: myisamdef.h:159
uint extra_alloc_procent
Definition: myisamdef.h:157
ulong mean_row_length
Definition: myisamdef.h:139
uint max_key_length
Definition: myisamdef.h:154
uint extra_alloc_bytes
Definition: myisamdef.h:156
ulong pack_fields
Definition: myisamdef.h:146
my_off_t max_data_file_length
Definition: myisamdef.h:135
uint blobs
Definition: myisamdef.h:151
ulong min_pack_length
Definition: myisamdef.h:142
uint auto_key
Definition: myisamdef.h:150
ha_rows reloc
Definition: myisamdef.h:138
ulong max_pack_length
Definition: myisamdef.h:143
Definition: myisamdef.h:245
uint bits
Definition: myisamdef.h:247
uchar * pos
Definition: myisamdef.h:248
uchar * blob_end
Definition: myisamdef.h:248
uchar * blob_pos
Definition: myisamdef.h:248
uint error
Definition: myisamdef.h:249
uchar * end
Definition: myisamdef.h:248
mi_bit_type current_byte
Definition: myisamdef.h:246
Definition: myisamdef.h:165
ulong length
Definition: myisamdef.h:168
ulong offset
Definition: myisamdef.h:166
uint pack_length
Definition: myisamdef.h:167
Definition: myisamdef.h:677
my_off_t next_filepos
Definition: myisamdef.h:684
uint second_read
Definition: myisamdef.h:686
uchar header[MI_BLOCK_INFO_HEADER_LENGTH]
Definition: myisamdef.h:678
my_off_t prev_filepos
Definition: myisamdef.h:685
my_off_t filepos
Definition: myisamdef.h:683
ulong rec_len
Definition: myisamdef.h:679
uint offset
Definition: myisamdef.h:687
ulong data_len
Definition: myisamdef.h:680
ulong block_len
Definition: myisamdef.h:681
ulong blob_len
Definition: myisamdef.h:682
Definition: myisam.h:343
Definition: myisam.h:228
Definition: myisam.h:213
Definition: myisamdef.h:254
my_off_t last_keypage
Definition: myisamdef.h:286
MI_STATUS_INFO * state
Definition: myisamdef.h:256
MI_BLOB * blobs
Definition: myisamdef.h:257
MYSQL_FTPARSER_PARAM * ftparser_param
Definition: myisamdef.h:263
uint save_lastkey_length
Definition: myisamdef.h:300
IO_CACHE rec_cache
Definition: myisamdef.h:310
myf lock_wait
Definition: myisamdef.h:312
uint last_rkey_length
Definition: myisamdef.h:298
MEM_ROOT ft_memroot
Definition: myisamdef.h:262
uchar * int_maxpos
Definition: myisamdef.h:274
uint opt_flag
Definition: myisamdef.h:294
my_off_t lastpos
Definition: myisamdef.h:282
ulong last_unique
Definition: myisamdef.h:279
uint8 once_flags
Definition: myisamdef.h:318
my_off_t save_lastpos
Definition: myisamdef.h:284
my_off_t last_search_keypage
Definition: myisamdef.h:287
int(* read_record)(MI_INFO *, my_off_t, uchar *)
Definition: myisamdef.h:277
int errkey
Definition: myisamdef.h:303
ulong this_unique
Definition: myisamdef.h:278
ulong packed_length
Definition: myisamdef.h:292
bool page_changed
Definition: myisamdef.h:316
uint data_changed
Definition: myisamdef.h:306
uint preload_buff_size
Definition: myisamdef.h:311
int dfile
Definition: myisamdef.h:293
uint update
Definition: myisamdef.h:295
uchar * rec_buff
Definition: myisamdef.h:272
int rtree_recursion_depth
Definition: myisamdef.h:330
ulong blob_length
Definition: myisamdef.h:292
my_off_t pos
Definition: myisamdef.h:285
bool append_insert_at_end
Definition: myisamdef.h:314
uint pack_key_length
Definition: myisamdef.h:301
uchar * int_keypos
Definition: myisamdef.h:273
uint lastkey_length
Definition: myisamdef.h:297
uchar * lastkey2
Definition: myisamdef.h:267
int save_lastinx
Definition: myisamdef.h:308
uchar * rtree_recursion_state
Definition: myisamdef.h:329
uchar * rnext_same_key
Definition: myisamdef.h:270
my_off_t dupp_key_pos
Definition: myisamdef.h:288
ulong this_loop
Definition: myisamdef.h:280
uint save_update
Definition: myisamdef.h:307
int lock_type
Definition: myisamdef.h:304
uchar * lastkey
Definition: myisamdef.h:267
MYISAM_SHARE * s
Definition: myisamdef.h:255
uchar * first_mbr_key
Definition: myisamdef.h:271
DYNAMIC_ARRAY * ft1_to_ft2
Definition: myisamdef.h:261
bool set_rnext_same_key
Definition: myisamdef.h:321
MI_BIT_BUFF bit_buff
Definition: myisamdef.h:258
void * index_cond_func_arg
Definition: myisamdef.h:324
int lastinx
Definition: myisamdef.h:296
ha_checksum checksum
Definition: myisamdef.h:289
enum ha_rkey_function last_key_func
Definition: myisamdef.h:299
ulong last_loop
Definition: myisamdef.h:281
bool was_locked
Definition: myisamdef.h:313
THR_LOCK_DATA lock
Definition: myisamdef.h:328
index_cond_func_t index_cond_func
Definition: myisamdef.h:323
LIST open_list
Definition: myisamdef.h:309
int tmp_lock_type
Definition: myisamdef.h:305
my_off_t nextpos
Definition: myisamdef.h:283
char * filename
Definition: myisamdef.h:265
uint16 last_used_keyseg
Definition: myisamdef.h:302
bool buff_used
Definition: myisamdef.h:317
bool quick_mode
Definition: myisamdef.h:315
MI_STATUS_INFO save_state
Definition: myisamdef.h:256
LIST in_use
Definition: myisamdef.h:264
uint int_nod_flag
Definition: myisamdef.h:275
uchar * buff
Definition: myisamdef.h:266
uint32 int_keytree_version
Definition: myisamdef.h:276
TREE * bulk_insert
Definition: myisamdef.h:260
Definition: myisam.h:173
Definition: myisamdef.h:523
uchar * prev_key
Definition: myisamdef.h:527
uint pack_marker
Definition: myisamdef.h:525
uint key_length
Definition: myisamdef.h:524
uint prev_length
Definition: myisamdef.h:525
uint n_ref_length
Definition: myisamdef.h:524
uchar * next_key_pos
Definition: myisamdef.h:527
const uchar * key
Definition: myisamdef.h:526
uint totlength
Definition: myisamdef.h:524
uint n_length
Definition: myisamdef.h:524
uint ref_length
Definition: myisamdef.h:524
uint part_of_prev_key
Definition: myisamdef.h:525
bool store_not_null
Definition: myisamdef.h:528
Definition: myisamdef.h:171
uchar version
Definition: myisamdef.h:174
ulong header_length
Definition: myisamdef.h:172
uint ref_length
Definition: myisamdef.h:173
Definition: myisamdef.h:341
uint real_key_length
Definition: myisamdef.h:355
int(* key_read)(MI_SORT_PARAM *, void *)
Definition: myisamdef.h:369
IO_CACHE tempfile
Definition: myisamdef.h:342
uint key
Definition: myisamdef.h:355
int(* write_key)(MI_SORT_PARAM *, IO_CACHE *, uchar *, uint, uint)
Definition: myisamdef.h:373
uchar ** sort_keys
Definition: myisamdef.h:362
my_off_t start_recpos
Definition: myisamdef.h:354
bool fix_datafile
Definition: myisamdef.h:357
uchar * record
Definition: myisamdef.h:366
void * wordptr
Definition: myisamdef.h:364
bool calc_checksum
Definition: myisamdef.h:358
uint sort_keys_length
Definition: myisamdef.h:356
HA_KEYSEG * seg
Definition: myisamdef.h:360
void * wordlist
Definition: myisamdef.h:364
ulonglong sortbuff_size
Definition: myisamdef.h:352
uint maxbuffers
Definition: myisamdef.h:356
MI_BIT_BUFF bit_buff
Definition: myisamdef.h:344
int(* key_write)(MI_SORT_PARAM *, const void *)
Definition: myisamdef.h:370
uint keys
Definition: myisamdef.h:356
my_off_t pos
Definition: myisamdef.h:354
my_off_t filepos
Definition: myisamdef.h:354
int(* key_cmp)(void *, uchar *, uchar *)
Definition: myisamdef.h:368
MY_TMPDIR * tmpdir
Definition: myisamdef.h:367
uint(* read_to_buffer)(IO_CACHE *, BUFFPEK *, uint)
Definition: myisamdef.h:372
DYNAMIC_ARRAY buffpek
Definition: myisamdef.h:343
bool master
Definition: myisamdef.h:357
my_off_t max_pos
Definition: myisamdef.h:354
SORT_INFO * sort_info
Definition: myisamdef.h:361
IO_CACHE tempfile_for_exceptions
Definition: myisamdef.h:342
uint find_length
Definition: myisamdef.h:356
uint key_length
Definition: myisamdef.h:355
ulonglong notnull[MI_MAX_KEY_SEG+1]
Definition: myisamdef.h:351
MI_KEYDEF * keyinfo
Definition: myisamdef.h:359
IO_CACHE read_cache
Definition: myisamdef.h:342
uchar * rec_buff
Definition: myisamdef.h:363
ulonglong unique[MI_MAX_KEY_SEG+1]
Definition: myisamdef.h:350
int(* write_keys)(MI_SORT_PARAM *, uchar **, uint, BUFFPEK *, IO_CACHE *)
Definition: myisamdef.h:371
MEM_ROOT wordroot
Definition: myisamdef.h:365
Definition: myisamdef.h:70
ulong sec_index_changed
Definition: myisamdef.h:101
my_off_t * key_del
Definition: myisamdef.h:98
ulong version
Definition: myisamdef.h:105
uchar language
Definition: myisamdef.h:82
my_off_t rec_per_key_rows
Definition: myisamdef.h:99
uint sortkey
Definition: myisamdef.h:109
time_t recover_time
Definition: myisamdef.h:107
ha_checksum checksum
Definition: myisamdef.h:104
uchar header_length[2]
Definition: myisamdef.h:74
uint state_diff_length
Definition: myisamdef.h:114
uchar file_version[4]
Definition: myisamdef.h:72
ulonglong auto_increment
Definition: myisamdef.h:91
uint state_length
Definition: myisamdef.h:115
ulong * key_info
Definition: myisamdef.h:116
ha_rows split
Definition: myisamdef.h:89
struct MI_STATE_INFO::@208 header
ulong * rec_per_key_part
Definition: myisamdef.h:96
uchar max_block_size_index
Definition: myisamdef.h:83
uchar keys
Definition: myisamdef.h:80
ulong status
Definition: myisamdef.h:95
uchar state_info_length[2]
Definition: myisamdef.h:75
my_off_t * key_root
Definition: myisamdef.h:97
MI_STATUS_INFO state
Definition: myisamdef.h:88
ulong unique
Definition: myisamdef.h:93
uint open_count
Definition: myisamdef.h:110
uchar uniques
Definition: myisamdef.h:81
uint8 changed
Definition: myisamdef.h:111
uchar fulltext_keys
Definition: myisamdef.h:84
uchar base_info_length[2]
Definition: myisamdef.h:76
uchar key_parts[2]
Definition: myisamdef.h:78
time_t create_time
Definition: myisamdef.h:106
ulong process
Definition: myisamdef.h:92
uchar unique_key_parts[2]
Definition: myisamdef.h:79
time_t check_time
Definition: myisamdef.h:108
uchar not_used
Definition: myisamdef.h:85
my_off_t dellink
Definition: myisamdef.h:90
uchar base_pos[2]
Definition: myisamdef.h:77
ulonglong key_map
Definition: myisamdef.h:103
ulong sec_index_used
Definition: myisamdef.h:102
ulong update_count
Definition: myisamdef.h:94
Definition: myisamdef.h:59
my_off_t data_file_length
Definition: myisamdef.h:65
my_off_t key_empty
Definition: myisamdef.h:63
my_off_t empty
Definition: myisamdef.h:62
ha_rows del
Definition: myisamdef.h:61
ha_checksum checksum
Definition: myisamdef.h:66
bool uncacheable
Definition: myisamdef.h:67
ha_rows records
Definition: myisamdef.h:60
my_off_t key_file_length
Definition: myisamdef.h:64
Definition: myisam.h:205
Definition: myisamdef.h:179
uint w_locks
Definition: myisamdef.h:223
bool concurrent_insert
Definition: myisamdef.h:232
ulong max_pack_length
Definition: myisamdef.h:214
size_t(* file_read)(MI_INFO *, uchar *, size_t, my_off_t, myf)
Definition: myisamdef.h:207
MI_KEYDEF ft2_keyinfo
Definition: myisamdef.h:182
mysql_rwlock_t * key_root_lock
Definition: myisamdef.h:236
uint tot_locks
Definition: myisamdef.h:223
char * index_file_name
Definition: myisamdef.h:192
ulong last_process
Definition: myisamdef.h:210
myf write_flag
Definition: myisamdef.h:225
MI_DECODE_TREE * decode_trees
Definition: myisamdef.h:195
MI_BASE_INFO base
Definition: myisamdef.h:181
uchar * file_map
Definition: myisamdef.h:193
int(* update_record)(MI_INFO *, my_off_t, const uchar *)
Definition: myisamdef.h:199
MI_UNIQUEDEF * uniqueinfo
Definition: myisamdef.h:184
File kfile
Definition: myisamdef.h:219
ha_checksum(* calc_checksum)(MI_INFO *, const uchar *)
Definition: myisamdef.h:204
char * unique_file_name
Definition: myisamdef.h:190
bool have_rtree
Definition: myisamdef.h:232
bool global_changed
Definition: myisamdef.h:231
LIST * in_use
Definition: myisamdef.h:189
MI_BLOB * blobs
Definition: myisamdef.h:188
uint32 ftkeys
Definition: myisamdef.h:218
int(* compare_unique)(MI_INFO *, MI_UNIQUEDEF *, const uchar *record, my_off_t pos)
Definition: myisamdef.h:205
bool temporary
Definition: myisamdef.h:232
bool changed
Definition: myisamdef.h:230
KEY_CACHE * key_cache
Definition: myisamdef.h:194
int(* compare_record)(MI_INFO *, const uchar *)
Definition: myisamdef.h:202
uint unique_name_length
Definition: myisamdef.h:217
HA_KEYSEG * keyparts
Definition: myisamdef.h:185
ulong last_version
Definition: myisamdef.h:211
uint blocksize
Definition: myisamdef.h:224
MI_STATE_INFO state
Definition: myisamdef.h:180
int(* delete_record)(MI_INFO *)
Definition: myisamdef.h:200
uint r_locks
Definition: myisamdef.h:223
char * data_file_name
Definition: myisamdef.h:191
uint rec_reflength
Definition: myisamdef.h:216
uint16 * decode_tables
Definition: myisamdef.h:196
uint nonmmaped_inserts
Definition: myisamdef.h:238
int(* write_record)(MI_INFO *, const uchar *)
Definition: myisamdef.h:198
int(* read_rnd)(MI_INFO *, uchar *, my_off_t, bool)
Definition: myisamdef.h:201
uint reopen
Definition: myisamdef.h:222
MI_COLUMNDEF * rec
Definition: myisamdef.h:186
mysql_mutex_t intern_lock
Definition: myisamdef.h:235
MI_PACK pack
Definition: myisamdef.h:187
mysql_rwlock_t mmap_lock
Definition: myisamdef.h:240
bool is_log_table
Definition: myisamdef.h:228
my_off_t mmaped_length
Definition: myisamdef.h:237
File data_file
Definition: myisamdef.h:220
bool delay_key_write
Definition: myisamdef.h:232
THR_LOCK lock
Definition: myisamdef.h:234
ulong state_diff_length
Definition: myisamdef.h:215
enum data_file_type data_file_type
Definition: myisamdef.h:226
ulong this_process
Definition: myisamdef.h:209
bool not_flushed
Definition: myisamdef.h:232
ulong min_pack_length
Definition: myisamdef.h:213
MI_KEYDEF * keyinfo
Definition: myisamdef.h:183
ulong options
Definition: myisamdef.h:212
int mode
Definition: myisamdef.h:221
int(* read_record)(MI_INFO *, my_off_t, uchar *)
Definition: myisamdef.h:197
size_t(* file_write)(MI_INFO *, const uchar *, size_t, my_off_t, myf)
Definition: myisamdef.h:208
Definition: plugin_ftparser.h:195
Definition: my_sys.h:304
Definition: myisam.h:389
Definition: thr_lock.h:124
Definition: thr_lock.h:139
Definition: my_tree.h:68
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:51
Definition: result.h:30
Definition: keycache.h:50
command
Definition: version_token.cc:280