@@ -66,8 +66,10 @@ typedef struct st_mi_state_info
66
66
ulong unique ; /* Unique number for this process */
67
67
ulong update_count ; /* Updated for each write lock */
68
68
ulong status ;
69
+ ulong * rec_per_key_part ;
69
70
my_off_t * key_root ; /* Start of key trees */
70
71
my_off_t * key_del ; /* delete links for trees */
72
+ my_off_t rec_per_key_rows ; /* Rows when calculating rec_per_key */
71
73
72
74
ulong sec_index_changed ; /* Updated when new sec_index */
73
75
ulong sec_index_used ; /* which extra index are in use */
@@ -80,8 +82,6 @@ typedef struct st_mi_state_info
80
82
uint sortkey ; /* sorted by this key (not used) */
81
83
uint open_count ;
82
84
uint8 changed ; /* Changed since myisamchk */
83
- my_off_t rec_per_key_rows ; /* Rows when calculating rec_per_key */
84
- ulong * rec_per_key_part ;
85
85
86
86
/* the following isn't saved on disk */
87
87
uint state_diff_length ; /* Should be 0 */
@@ -164,40 +164,41 @@ typedef struct st_mi_isam_share { /* Shared between opens */
164
164
char * data_file_name , /* Resolved path names from symlinks */
165
165
* index_file_name ;
166
166
byte * file_map ; /* mem-map of file if possible */
167
+ MI_DECODE_TREE * decode_trees ;
168
+ uint16 * decode_tables ;
169
+ int (* read_record )(struct st_myisam_info * , my_off_t , byte * );
170
+ int (* write_record )(struct st_myisam_info * , const byte * );
171
+ int (* update_record )(struct st_myisam_info * , my_off_t , const byte * );
172
+ int (* delete_record )(struct st_myisam_info * );
173
+ int (* read_rnd )(struct st_myisam_info * , byte * , my_off_t , my_bool );
174
+ int (* compare_record )(struct st_myisam_info * , const byte * );
175
+ ha_checksum (* calc_checksum )(struct st_myisam_info * , const byte * );
176
+ int (* compare_unique )(struct st_myisam_info * , MI_UNIQUEDEF * ,
177
+ const byte * record , my_off_t pos );
178
+ invalidator_by_filename invalidator ; /* query cache invalidator */
167
179
ulong this_process ; /* processid */
168
180
ulong last_process ; /* For table-change-check */
169
181
ulong last_version ; /* Version on start */
170
182
ulong options ; /* Options used */
183
+ ulong min_pack_length ; /* Theese are used by packed data */
184
+ ulong max_pack_length ;
185
+ ulong state_diff_length ;
171
186
uint rec_reflength ; /* rec_reflength in use now */
172
187
File kfile ; /* Shared keyfile */
173
188
File data_file ; /* Shared data file */
174
189
int mode ; /* mode of file on open */
175
190
uint reopen ; /* How many times reopened */
176
191
uint w_locks ,r_locks ,tot_locks ; /* Number of read/write locks */
177
192
uint blocksize ; /* blocksize of keyfile */
178
- ulong min_pack_length ; /* Theese are used by packed data */
179
- ulong max_pack_length ;
180
- ulong state_diff_length ;
193
+ myf write_flag ;
194
+ int rnd ; /* rnd-counter */
195
+ enum data_file_type data_file_type ;
181
196
my_bool changed , /* If changed since lock */
182
197
global_changed , /* If changed since open */
183
198
not_flushed ,
184
199
temporary ,delay_key_write ,
185
200
concurrent_insert ,
186
201
fulltext_index ;
187
- myf write_flag ;
188
- int rnd ; /* rnd-counter */
189
- MI_DECODE_TREE * decode_trees ;
190
- uint16 * decode_tables ;
191
- enum data_file_type data_file_type ;
192
- int (* read_record )(struct st_myisam_info * , my_off_t , byte * );
193
- int (* write_record )(struct st_myisam_info * , const byte * );
194
- int (* update_record )(struct st_myisam_info * , my_off_t , const byte * );
195
- int (* delete_record )(struct st_myisam_info * );
196
- int (* read_rnd )(struct st_myisam_info * , byte * , my_off_t , my_bool );
197
- int (* compare_record )(struct st_myisam_info * , const byte * );
198
- ha_checksum (* calc_checksum )(struct st_myisam_info * , const byte * );
199
- int (* compare_unique )(struct st_myisam_info * , MI_UNIQUEDEF * ,
200
- const byte * record , my_off_t pos );
201
202
#ifdef THREAD
202
203
THR_LOCK lock ;
203
204
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 */
215
216
uint error ;
216
217
} MI_BIT_BUFF ;
217
218
218
-
219
219
struct st_myisam_info {
220
220
MYISAM_SHARE * s ; /* Shared between open:s */
221
221
MI_STATUS_INFO * state ,save_state ;
222
222
MI_BLOB * blobs ; /* Pointer to blobs */
223
- int dfile ; /* The datafile */
224
- MI_BIT_BUFF bit_buff ;
225
- uint opt_flag ; /* Optim. for space/speed */
226
- uint update ; /* If file changed since open */
223
+ MI_BIT_BUFF bit_buff ;
224
+ /* accumulate indexfile changes between write's */
225
+ TREE * bulk_insert ;
227
226
char * filename ; /* parameter to open filename */
227
+ uchar * buff , /* Temp area for key */
228
+ * lastkey ,* lastkey2 ; /* Last used search key */
229
+ byte * rec_buff , /* Tempbuff for recordpack */
230
+ * rec_alloc ; /* Malloced area for record */
231
+ uchar * int_keypos , /* Save position for next/previous */
232
+ * int_maxpos ; /* -""- */
233
+ int (* read_record )(struct st_myisam_info * , my_off_t , byte * );
234
+ invalidator_by_filename invalidator ; /* query cache invalidator */
228
235
ulong this_unique ; /* uniq filenumber or thread */
229
236
ulong last_unique ; /* last unique number */
230
237
ulong this_loop ; /* counter for this open */
@@ -233,20 +240,16 @@ struct st_myisam_info {
233
240
nextpos ; /* Position to next record */
234
241
my_off_t save_lastpos ;
235
242
my_off_t pos ; /* Intern variable */
243
+ my_off_t last_keypage ; /* Last key page read */
244
+ my_off_t last_search_keypage ; /* Last keypage when searching */
245
+ my_off_t dupp_key_pos ;
236
246
ha_checksum checksum ;
237
247
ulong packed_length ,blob_length ; /* Length of found, packed record */
248
+ int dfile ; /* The datafile */
249
+ uint opt_flag ; /* Optim. for space/speed */
250
+ uint update ; /* If file changed since open */
238
251
uint alloced_rec_buff_length ; /* Max recordlength malloced */
239
- uchar * buff , /* Temp area for key */
240
- * lastkey ,* lastkey2 ; /* Last used search key */
241
- byte * rec_buff , /* Tempbuff for recordpack */
242
- * rec_alloc ; /* Malloced area for record */
243
- uchar * int_keypos , /* Save position for next/previous */
244
- * int_maxpos ; /* -""- */
245
- uint32 int_keytree_version ; /* -""- */
246
252
uint int_nod_flag ; /* -""- */
247
- my_off_t last_keypage ; /* Last key page read */
248
- my_off_t last_search_keypage ; /* Last keypage when searching */
249
- my_off_t dupp_key_pos ;
250
253
int lastinx ; /* Last used index */
251
254
uint lastkey_length ; /* Length of key in lastkey */
252
255
uint last_rkey_length ; /* Last length in mi_rkey() */
@@ -257,16 +260,15 @@ struct st_myisam_info {
257
260
uint data_changed ; /* Somebody has changed data */
258
261
uint save_update ; /* When using KEY_READ */
259
262
int save_lastinx ;
263
+ uint32 int_keytree_version ; /* -""- */
264
+ LIST open_list ;
265
+ IO_CACHE rec_cache ; /* When cacheing records */
266
+ myf lock_wait ; /* is 0 or MY_DONT_WAIT */
260
267
my_bool was_locked ; /* Was locked in panic */
261
268
my_bool quick_mode ;
262
269
my_bool page_changed ; /* If info->buff can't be used for rnext */
263
270
my_bool buff_used ; /* If info->buff has to be reread for rnext */
264
271
my_bool use_packed_key ; /* For MYISAMMRG */
265
- TREE * bulk_insert ; /* accumulate indexfile changes between mi_write's */
266
- myf lock_wait ; /* is 0 or MY_DONT_WAIT */
267
- int (* read_record )(struct st_myisam_info * , my_off_t , byte * );
268
- LIST open_list ;
269
- IO_CACHE rec_cache ; /* When cacheing records */
270
272
#ifdef THREAD
271
273
THR_LOCK_DATA lock ;
272
274
#endif
0 commit comments