diff options
Diffstat (limited to 'myisam/myisamdef.h')
-rw-r--r-- | myisam/myisamdef.h | 80 |
1 files changed, 41 insertions, 39 deletions
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h index e8b9c1b83ec..203101a2f48 100644 --- a/myisam/myisamdef.h +++ b/myisam/myisamdef.h @@ -66,8 +66,10 @@ typedef struct st_mi_state_info ulong unique; /* Unique number for this process */ ulong update_count; /* Updated for each write lock */ ulong status; + ulong *rec_per_key_part; my_off_t *key_root; /* Start of key trees */ my_off_t *key_del; /* delete links for trees */ + my_off_t rec_per_key_rows; /* Rows when calculating rec_per_key */ ulong sec_index_changed; /* Updated when new sec_index */ ulong sec_index_used; /* which extra index are in use */ @@ -80,8 +82,6 @@ typedef struct st_mi_state_info uint sortkey; /* sorted by this key (not used) */ uint open_count; uint8 changed; /* Changed since myisamchk */ - my_off_t rec_per_key_rows; /* Rows when calculating rec_per_key */ - ulong *rec_per_key_part; /* the following isn't saved on disk */ uint state_diff_length; /* Should be 0 */ @@ -164,10 +164,25 @@ typedef struct st_mi_isam_share { /* Shared between opens */ char *data_file_name, /* Resolved path names from symlinks */ *index_file_name; byte *file_map; /* mem-map of file if possible */ + MI_DECODE_TREE *decode_trees; + uint16 *decode_tables; + int (*read_record)(struct st_myisam_info*, my_off_t, byte*); + int (*write_record)(struct st_myisam_info*, const byte*); + int (*update_record)(struct st_myisam_info*, my_off_t, const byte*); + int (*delete_record)(struct st_myisam_info*); + int (*read_rnd)(struct st_myisam_info*, byte*, my_off_t, my_bool); + int (*compare_record)(struct st_myisam_info*, const byte *); + ha_checksum (*calc_checksum)(struct st_myisam_info*, const byte *); + int (*compare_unique)(struct st_myisam_info*, MI_UNIQUEDEF *, + const byte *record, my_off_t pos); + invalidator_by_filename invalidator; /* query cache invalidator */ ulong this_process; /* processid */ ulong last_process; /* For table-change-check */ ulong last_version; /* Version on start */ ulong options; /* Options used */ + ulong min_pack_length; /* Theese are used by packed data */ + ulong max_pack_length; + ulong state_diff_length; uint rec_reflength; /* rec_reflength in use now */ File kfile; /* Shared keyfile */ File data_file; /* Shared data file */ @@ -175,29 +190,15 @@ typedef struct st_mi_isam_share { /* Shared between opens */ uint reopen; /* How many times reopened */ uint w_locks,r_locks,tot_locks; /* Number of read/write locks */ uint blocksize; /* blocksize of keyfile */ - ulong min_pack_length; /* Theese are used by packed data */ - ulong max_pack_length; - ulong state_diff_length; + myf write_flag; + int rnd; /* rnd-counter */ + enum data_file_type data_file_type; my_bool changed, /* If changed since lock */ global_changed, /* If changed since open */ not_flushed, temporary,delay_key_write, concurrent_insert, fulltext_index; - myf write_flag; - int rnd; /* rnd-counter */ - MI_DECODE_TREE *decode_trees; - uint16 *decode_tables; - enum data_file_type data_file_type; - int (*read_record)(struct st_myisam_info*, my_off_t, byte*); - int (*write_record)(struct st_myisam_info*, const byte*); - int (*update_record)(struct st_myisam_info*, my_off_t, const byte*); - int (*delete_record)(struct st_myisam_info*); - int (*read_rnd)(struct st_myisam_info*, byte*, my_off_t, my_bool); - int (*compare_record)(struct st_myisam_info*, const byte *); - ha_checksum (*calc_checksum)(struct st_myisam_info*, const byte *); - int (*compare_unique)(struct st_myisam_info*, MI_UNIQUEDEF *, - const byte *record, my_off_t pos); #ifdef THREAD THR_LOCK lock; pthread_mutex_t intern_lock; /* Locking for use with _locking */ @@ -215,16 +216,22 @@ typedef struct st_mi_bit_buff { /* Used for packing of record */ uint error; } MI_BIT_BUFF; - struct st_myisam_info { MYISAM_SHARE *s; /* Shared between open:s */ MI_STATUS_INFO *state,save_state; MI_BLOB *blobs; /* Pointer to blobs */ - int dfile; /* The datafile */ - MI_BIT_BUFF bit_buff; - uint opt_flag; /* Optim. for space/speed */ - uint update; /* If file changed since open */ + MI_BIT_BUFF bit_buff; + /* accumulate indexfile changes between write's */ + TREE *bulk_insert; char *filename; /* parameter to open filename */ + uchar *buff, /* Temp area for key */ + *lastkey,*lastkey2; /* Last used search key */ + byte *rec_buff, /* Tempbuff for recordpack */ + *rec_alloc; /* Malloced area for record */ + uchar *int_keypos, /* Save position for next/previous */ + *int_maxpos; /* -""- */ + int (*read_record)(struct st_myisam_info*, my_off_t, byte*); + invalidator_by_filename invalidator; /* query cache invalidator */ ulong this_unique; /* uniq filenumber or thread */ ulong last_unique; /* last unique number */ ulong this_loop; /* counter for this open */ @@ -233,20 +240,16 @@ struct st_myisam_info { nextpos; /* Position to next record */ my_off_t save_lastpos; my_off_t pos; /* Intern variable */ + my_off_t last_keypage; /* Last key page read */ + my_off_t last_search_keypage; /* Last keypage when searching */ + my_off_t dupp_key_pos; ha_checksum checksum; ulong packed_length,blob_length; /* Length of found, packed record */ + int dfile; /* The datafile */ + uint opt_flag; /* Optim. for space/speed */ + uint update; /* If file changed since open */ uint alloced_rec_buff_length; /* Max recordlength malloced */ - uchar *buff, /* Temp area for key */ - *lastkey,*lastkey2; /* Last used search key */ - byte *rec_buff, /* Tempbuff for recordpack */ - *rec_alloc; /* Malloced area for record */ - uchar *int_keypos, /* Save position for next/previous */ - *int_maxpos; /* -""- */ - uint32 int_keytree_version; /* -""- */ uint int_nod_flag; /* -""- */ - my_off_t last_keypage; /* Last key page read */ - my_off_t last_search_keypage; /* Last keypage when searching */ - my_off_t dupp_key_pos; int lastinx; /* Last used index */ uint lastkey_length; /* Length of key in lastkey */ uint last_rkey_length; /* Last length in mi_rkey() */ @@ -257,16 +260,15 @@ struct st_myisam_info { uint data_changed; /* Somebody has changed data */ uint save_update; /* When using KEY_READ */ int save_lastinx; + uint32 int_keytree_version; /* -""- */ + LIST open_list; + IO_CACHE rec_cache; /* When cacheing records */ + myf lock_wait; /* is 0 or MY_DONT_WAIT */ my_bool was_locked; /* Was locked in panic */ my_bool quick_mode; my_bool page_changed; /* If info->buff can't be used for rnext */ my_bool buff_used; /* If info->buff has to be reread for rnext */ my_bool use_packed_key; /* For MYISAMMRG */ - TREE *bulk_insert; /* accumulate indexfile changes between mi_write's */ - myf lock_wait; /* is 0 or MY_DONT_WAIT */ - int (*read_record)(struct st_myisam_info*, my_off_t, byte*); - LIST open_list; - IO_CACHE rec_cache; /* When cacheing records */ #ifdef THREAD THR_LOCK_DATA lock; #endif |