~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisam.h

Cleanup around SAFEMALLOC

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* This file should be included when using myisam_funktions */
17
17
 
18
 
#ifndef PLUGIN_MYISAM_MYISAM_H
19
 
#define PLUGIN_MYISAM_MYISAM_H
20
 
 
21
 
#include <drizzled/key_map.h>
 
18
#ifndef _myisam_h
 
19
#define _myisam_h
 
20
#ifdef  __cplusplus
 
21
extern "C" {
 
22
#endif
22
23
 
23
24
#include <drizzled/base.h>
24
25
#ifndef _m_ctype_h
25
 
#include "drizzled/charset_info.h"
 
26
#include <m_ctype.h>
26
27
#endif
27
28
#ifndef _keycache_h
28
29
#include "keycache.h"
29
30
#endif
30
 
#include <plugin/myisam/my_handler.h>
31
 
#include "drizzled/internal/iocache.h"
 
31
#include <mysys/my_handler.h>
 
32
#include <drizzled/plugin.h>
32
33
 
33
34
/*
34
35
  Limit max keys according to HA_MAX_POSSIBLE_KEY
68
69
  This means that clearing of high keys is ignored, setting one high key
69
70
  sets all high keys.
70
71
*/
71
 
#define MI_KEYMAP_BITS      (64)
72
 
#define MI_KEYMAP_HIGH_MASK (1UL << (MI_KEYMAP_BITS - 1))
 
72
#define MI_KEYMAP_BITS      (8 * SIZEOF_LONG_LONG)
 
73
#define MI_KEYMAP_HIGH_MASK (1ULL << (MI_KEYMAP_BITS - 1))
73
74
#define mi_get_mask_all_keys_active(_keys_) \
74
75
                            (((_keys_) < MI_KEYMAP_BITS) ? \
75
 
                             ((1UL << (_keys_)) - 1UL) : \
76
 
                             (~ 0UL))
 
76
                             ((1ULL << (_keys_)) - 1ULL) : \
 
77
                             (~ 0ULL))
77
78
 
78
79
#if MI_MAX_KEY > MI_KEYMAP_BITS
79
80
 
80
81
#define mi_is_key_active(_keymap_,_keyno_) \
81
82
                            (((_keyno_) < MI_KEYMAP_BITS) ? \
82
 
                             test((_keymap_) & (1UL << (_keyno_))) : \
 
83
                             test((_keymap_) & (1ULL << (_keyno_))) : \
83
84
                             test((_keymap_) & MI_KEYMAP_HIGH_MASK))
84
85
#define mi_set_key_active(_keymap_,_keyno_) \
85
86
                            (_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
86
 
                                          (1UL << (_keyno_)) : \
 
87
                                          (1ULL << (_keyno_)) : \
87
88
                                          MI_KEYMAP_HIGH_MASK)
88
89
#define mi_clear_key_active(_keymap_,_keyno_) \
89
90
                            (_keymap_)&= (((_keyno_) < MI_KEYMAP_BITS) ? \
90
 
                                          (~ (1UL << (_keyno_))) : \
91
 
                                          (~ (0UL)) /*ignore*/ )
 
91
                                          (~ (1ULL << (_keyno_))) : \
 
92
                                          (~ (0ULL)) /*ignore*/ )
92
93
 
93
94
#else
94
95
 
95
96
#define mi_is_key_active(_keymap_,_keyno_) \
96
 
                            test((_keymap_) & (1UL << (_keyno_)))
 
97
                            test((_keymap_) & (1ULL << (_keyno_)))
97
98
#define mi_set_key_active(_keymap_,_keyno_) \
98
 
                            (_keymap_)|= (1UL << (_keyno_))
 
99
                            (_keymap_)|= (1ULL << (_keyno_))
99
100
#define mi_clear_key_active(_keymap_,_keyno_) \
100
 
                            (_keymap_)&= (~ (1UL << (_keyno_)))
 
101
                            (_keymap_)&= (~ (1ULL << (_keyno_)))
101
102
 
102
103
#endif
103
104
 
122
123
 
123
124
typedef struct st_mi_isaminfo           /* Struct from h_info */
124
125
{
125
 
  drizzled::ha_rows records;                    /* Records in database */
126
 
  drizzled::ha_rows deleted;                    /* Deleted records in database */
127
 
  drizzled::internal::my_off_t recpos;                  /* Pos for last used record */
128
 
  drizzled::internal::my_off_t newrecpos;                       /* Pos if we write new record */
129
 
  drizzled::internal::my_off_t dupp_key_pos;            /* Position to record with dupp key */
130
 
  drizzled::internal::my_off_t data_file_length,                /* Length of data file */
 
126
  ha_rows records;                      /* Records in database */
 
127
  ha_rows deleted;                      /* Deleted records in database */
 
128
  my_off_t recpos;                      /* Pos for last used record */
 
129
  my_off_t newrecpos;                   /* Pos if we write new record */
 
130
  my_off_t dupp_key_pos;                /* Position to record with dupp key */
 
131
  my_off_t data_file_length,            /* Length of data file */
131
132
           max_data_file_length,
132
133
           index_file_length,
133
134
           max_index_file_length,
137
138
  uint64_t auto_increment;
138
139
  uint64_t key_map;                     /* Which keys are used */
139
140
  char  *data_file_name, *index_file_name;
140
 
  uint32_t  keys;                               /* Number of keys in use */
 
141
  uint  keys;                           /* Number of keys in use */
141
142
  uint  options;                        /* HA_OPTION_... used */
142
143
  int   errkey,                         /* With key was dupplicated on err */
143
144
        sortkey;                        /* clustered by this key */
144
 
  int   filenr;                         /* (uniq) filenr for datafile */
 
145
  File  filenr;                         /* (uniq) filenr for datafile */
145
146
  time_t create_time;                   /* When table was created */
146
147
  time_t check_time;
147
148
  time_t update_time;
148
 
  uint32_t  reflength;
 
149
  uint  reflength;
149
150
  ulong record_offset;
150
151
  ulong *rec_per_key;                   /* for sql optimizing */
151
152
} MI_ISAMINFO;
154
155
typedef struct st_mi_create_info
155
156
{
156
157
  const char *index_file_name, *data_file_name; /* If using symlinks */
157
 
  drizzled::ha_rows max_rows;
158
 
  drizzled::ha_rows reloc_rows;
 
158
  ha_rows max_rows;
 
159
  ha_rows reloc_rows;
159
160
  uint64_t auto_increment;
160
161
  uint64_t data_file_length;
161
162
  uint64_t key_file_length;
162
 
  uint32_t old_options;
 
163
  uint old_options;
163
164
  uint8_t language;
164
165
  bool with_auto_increment;
165
166
} MI_CREATE_INFO;
187
188
  HA_KEYSEG *seg,*end;
188
189
 
189
190
  int (*bin_search)(struct st_myisam_info *info,struct st_mi_keydef *keyinfo,
190
 
                    unsigned char *page,unsigned char *key,
191
 
                    uint32_t key_len,uint32_t comp_flag,unsigned char * *ret_pos,
192
 
                    unsigned char *buff, bool *was_last_key);
193
 
  uint32_t (*get_key)(struct st_mi_keydef *keyinfo,uint32_t nod_flag,unsigned char * *page,
194
 
                  unsigned char *key);
195
 
  int (*pack_key)(struct st_mi_keydef *keyinfo,uint32_t nod_flag,unsigned char *next_key,
196
 
                  unsigned char *org_key, unsigned char *prev_key, unsigned char *key,
 
191
                    uchar *page,uchar *key,
 
192
                    uint key_len,uint comp_flag,uchar * *ret_pos,
 
193
                    uchar *buff, bool *was_last_key);
 
194
  uint (*get_key)(struct st_mi_keydef *keyinfo,uint nod_flag,uchar * *page,
 
195
                  uchar *key);
 
196
  int (*pack_key)(struct st_mi_keydef *keyinfo,uint nod_flag,uchar *next_key,
 
197
                  uchar *org_key, uchar *prev_key, uchar *key,
197
198
                  struct st_mi_s_param *s_temp);
198
 
  void (*store_key)(struct st_mi_keydef *keyinfo, unsigned char *key_pos,
 
199
  void (*store_key)(struct st_mi_keydef *keyinfo, uchar *key_pos,
199
200
                    struct st_mi_s_param *s_temp);
200
 
  int (*ck_insert)(struct st_myisam_info *inf, uint32_t k_nr, unsigned char *k, uint32_t klen);
201
 
  int (*ck_delete)(struct st_myisam_info *inf, uint32_t k_nr, unsigned char *k, uint32_t klen);
 
201
  int (*ck_insert)(struct st_myisam_info *inf, uint k_nr, uchar *k, uint klen);
 
202
  int (*ck_delete)(struct st_myisam_info *inf, uint k_nr, uchar *k, uint klen);
202
203
} MI_KEYDEF;
203
204
 
204
205
 
207
208
typedef struct st_unique_def            /* Segment definition of unique */
208
209
{
209
210
  uint16_t keysegs;                     /* Number of key-segment */
210
 
  unsigned char key;                            /* Mapped to which key */
 
211
  uchar key;                            /* Mapped to which key */
211
212
  uint8_t null_are_equal;
212
213
  HA_KEYSEG *seg,*end;
213
214
} MI_UNIQUEDEF;
216
217
{
217
218
  uint16_t *table;
218
219
  uint   quick_table_bits;
219
 
  unsigned char  *intervalls;
 
220
  uchar  *intervalls;
220
221
} MI_DECODE_TREE;
221
222
 
222
223
 
228
229
  type, length, null_bit and null_pos
229
230
*/
230
231
 
231
 
namespace drizzled
232
 
{
233
 
 
234
232
typedef struct st_columndef             /* column information */
235
233
{
236
234
  int16_t  type;                                /* en_fieldtype */
241
239
 
242
240
#ifndef NOT_PACKED_DATABASES
243
241
  void (*unpack)(struct st_columndef *rec,struct st_mi_bit_buff *buff,
244
 
                 unsigned char *start,unsigned char *end);
245
 
  enum drizzled::en_fieldtype base_type;
246
 
  uint32_t space_length_bits,pack_type;
 
242
                 uchar *start,uchar *end);
 
243
  enum en_fieldtype base_type;
 
244
  uint space_length_bits,pack_type;
247
245
  MI_DECODE_TREE *huff_tree;
248
246
#endif
249
247
} MI_COLUMNDEF;
250
248
 
251
 
}
252
 
 
253
249
 
254
250
extern char * myisam_log_filename;              /* Name of logfile */
255
251
extern uint32_t myisam_block_size;
256
252
extern uint32_t myisam_concurrent_insert;
257
 
extern uint32_t myisam_bulk_insert_tree_size; 
258
 
extern uint32_t data_pointer_size;
 
253
extern bool myisam_flush,myisam_delay_key_write,myisam_single_user;
 
254
extern my_off_t myisam_max_temp_length;
 
255
extern uint32_t myisam_bulk_insert_tree_size, myisam_data_pointer_size;
259
256
 
260
257
        /* Prototypes for myisam-functions */
261
258
 
262
259
extern int mi_close(struct st_myisam_info *file);
263
 
extern int mi_delete(struct st_myisam_info *file,const unsigned char *buff);
 
260
extern int mi_delete(struct st_myisam_info *file,const uchar *buff);
264
261
extern struct st_myisam_info *mi_open(const char *name,int mode,
265
 
                                      uint32_t wait_if_locked);
266
 
extern int mi_panic(enum drizzled::ha_panic_function function);
267
 
extern int mi_rfirst(struct st_myisam_info *file,unsigned char *buf,int inx);
268
 
extern int mi_rkey(MI_INFO *info, unsigned char *buf, int inx, const unsigned char *key,
269
 
                   drizzled::key_part_map keypart_map, enum drizzled::ha_rkey_function search_flag);
270
 
extern int mi_rlast(struct st_myisam_info *file,unsigned char *buf,int inx);
271
 
extern int mi_rnext(struct st_myisam_info *file,unsigned char *buf,int inx);
272
 
extern int mi_rnext_same(struct st_myisam_info *info, unsigned char *buf);
273
 
extern int mi_rprev(struct st_myisam_info *file,unsigned char *buf,int inx);
274
 
extern int mi_rrnd(struct st_myisam_info *file,unsigned char *buf, drizzled::internal::my_off_t pos);
 
262
                                      uint wait_if_locked);
 
263
extern int mi_panic(enum ha_panic_function function);
 
264
extern int mi_rfirst(struct st_myisam_info *file,uchar *buf,int inx);
 
265
extern int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
 
266
                   key_part_map keypart_map, enum ha_rkey_function search_flag);
 
267
extern int mi_rlast(struct st_myisam_info *file,uchar *buf,int inx);
 
268
extern int mi_rnext(struct st_myisam_info *file,uchar *buf,int inx);
 
269
extern int mi_rnext_same(struct st_myisam_info *info, uchar *buf);
 
270
extern int mi_rprev(struct st_myisam_info *file,uchar *buf,int inx);
 
271
extern int mi_rrnd(struct st_myisam_info *file,uchar *buf, my_off_t pos);
275
272
extern int mi_scan_init(struct st_myisam_info *file);
276
 
extern int mi_scan(struct st_myisam_info *file,unsigned char *buf);
277
 
extern int mi_rsame(struct st_myisam_info *file,unsigned char *record,int inx);
278
 
extern int mi_update(struct st_myisam_info *file,const unsigned char *old,
279
 
                     unsigned char *new_record);
280
 
extern int mi_write(struct st_myisam_info *file,unsigned char *buff);
281
 
extern drizzled::internal::my_off_t mi_position(struct st_myisam_info *file);
282
 
extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint32_t flag);
 
273
extern int mi_scan(struct st_myisam_info *file,uchar *buf);
 
274
extern int mi_rsame(struct st_myisam_info *file,uchar *record,int inx);
 
275
extern int mi_rsame_with_pos(struct st_myisam_info *file,uchar *record,
 
276
                             int inx, my_off_t pos);
 
277
extern int mi_update(struct st_myisam_info *file,const uchar *old,
 
278
                     uchar *new_record);
 
279
extern int mi_write(struct st_myisam_info *file,uchar *buff);
 
280
extern my_off_t mi_position(struct st_myisam_info *file);
 
281
extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint flag);
283
282
extern int mi_lock_database(struct st_myisam_info *file,int lock_type);
284
 
extern int mi_create(const char *name,uint32_t keys,MI_KEYDEF *keydef,
285
 
                     uint32_t columns, drizzled::MI_COLUMNDEF *columndef,
286
 
                     uint32_t uniques, MI_UNIQUEDEF *uniquedef,
287
 
                     MI_CREATE_INFO *create_info, uint32_t flags);
 
283
extern int mi_create(const char *name,uint keys,MI_KEYDEF *keydef,
 
284
                     uint columns, MI_COLUMNDEF *columndef,
 
285
                     uint uniques, MI_UNIQUEDEF *uniquedef,
 
286
                     MI_CREATE_INFO *create_info, uint flags);
288
287
extern int mi_delete_table(const char *name);
289
288
extern int mi_rename(const char *from, const char *to);
290
289
extern int mi_extra(struct st_myisam_info *file,
291
 
                    enum drizzled::ha_extra_function function,
 
290
                    enum ha_extra_function function,
292
291
                    void *extra_arg);
293
292
extern int mi_reset(struct st_myisam_info *file);
294
 
extern drizzled::ha_rows mi_records_in_range(MI_INFO *info, int inx,
295
 
                                   drizzled::key_range *min_key, drizzled::key_range *max_key);
 
293
extern ha_rows mi_records_in_range(MI_INFO *info, int inx,
 
294
                                   key_range *min_key, key_range *max_key);
296
295
extern int mi_log(int activate_log);
 
296
extern int mi_is_changed(struct st_myisam_info *info);
297
297
extern int mi_delete_all_rows(struct st_myisam_info *info);
298
 
extern ulong _mi_calc_blob_length(uint32_t length , const unsigned char *pos);
299
 
extern uint32_t mi_get_pointer_length(uint64_t file_length, uint32_t def);
 
298
extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
 
299
extern uint mi_get_pointer_length(uint64_t file_length, uint def);
300
300
 
301
301
/* this is used to pass to mysql_myisamchk_table */
302
302
 
348
348
 
349
349
#define T_REP_ANY               (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
350
350
 
 
351
/*
 
352
  Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
 
353
  to mi_check.c follows:
 
354
*/
 
355
 
 
356
#define TT_USEFRM               1
 
357
#define TT_FOR_UPGRADE          2
 
358
 
351
359
#define O_NEW_INDEX     1               /* Bits set in out_flag */
352
360
#define O_NEW_DATA      2
353
361
#define O_DATA_LOST     4
356
364
 
357
365
typedef struct st_sort_key_blocks               /* Used when sorting */
358
366
{
359
 
  unsigned char *buff,*end_pos;
360
 
  unsigned char lastkey[MI_MAX_POSSIBLE_KEY_BUFF];
361
 
  uint32_t last_length;
 
367
  uchar *buff,*end_pos;
 
368
  uchar lastkey[MI_MAX_POSSIBLE_KEY_BUFF];
 
369
  uint last_length;
362
370
  int inited;
363
371
} SORT_KEY_BLOCKS;
364
372
 
365
373
 
366
 
/*
367
 
  MyISAM supports several statistics collection methods. Currently statistics
368
 
  collection method is not stored in MyISAM file and has to be specified for
 
374
/* 
 
375
  MyISAM supports several statistics collection methods. Currently statistics 
 
376
  collection method is not stored in MyISAM file and has to be specified for 
369
377
  each table analyze/repair operation in  MI_CHECK::stats_method.
370
378
*/
371
379
 
372
 
typedef enum
 
380
typedef enum 
373
381
{
374
382
  /* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
375
383
  MI_STATS_METHOD_NULLS_NOT_EQUAL,
385
393
  uint64_t max_data_file_length;
386
394
  uint64_t keys_in_use;
387
395
  uint64_t max_record_length;
388
 
  drizzled::internal::my_off_t search_after_block;
389
 
  drizzled::internal::my_off_t new_file_pos,key_file_blocks;
390
 
  drizzled::internal::my_off_t keydata,totaldata,key_blocks,start_check_pos;
391
 
  drizzled::ha_rows total_records,total_deleted;
392
 
  drizzled::internal::ha_checksum record_checksum,glob_crc;
393
 
  uint64_t use_buffers;
394
 
  size_t read_buffer_length, write_buffer_length,
395
 
         sort_buffer_length, sort_key_blocks;
396
 
  uint32_t out_flag,warning_printed,error_printed,verbose;
397
 
  uint32_t opt_sort_key,total_files,max_level;
398
 
  uint32_t testflag, key_cache_block_size;
 
396
  my_off_t search_after_block;
 
397
  my_off_t new_file_pos,key_file_blocks;
 
398
  my_off_t keydata,totaldata,key_blocks,start_check_pos;
 
399
  ha_rows total_records,total_deleted;
 
400
  ha_checksum record_checksum,glob_crc;
 
401
  ulong use_buffers,read_buffer_length,write_buffer_length,
 
402
        sort_buffer_length,sort_key_blocks;
 
403
  uint out_flag,warning_printed,error_printed,verbose;
 
404
  uint opt_sort_key,total_files,max_level;
 
405
  uint testflag, key_cache_block_size;
399
406
  uint8_t language;
400
407
  bool using_global_keycache, opt_lock_memory, opt_follow_links;
401
408
  bool retry_repair, force_sort;
402
409
  char temp_filename[FN_REFLEN],*isam_file_name;
 
410
  MY_TMPDIR *tmpdir;
403
411
  int tmpfile_createflag;
404
 
  drizzled::myf myf_rw;
405
 
  drizzled::internal::IO_CACHE read_cache;
406
 
 
407
 
  /*
 
412
  myf myf_rw;
 
413
  IO_CACHE read_cache;
 
414
  
 
415
  /* 
408
416
    The next two are used to collect statistics, see update_key_parts for
409
417
    description.
410
418
  */
411
419
  uint64_t unique_count[MI_MAX_KEY_SEG+1];
412
420
  uint64_t notnull_count[MI_MAX_KEY_SEG+1];
413
 
 
414
 
  drizzled::internal::ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
 
421
  
 
422
  ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
415
423
  ulong rec_per_key_part[MI_MAX_KEY_SEG*HA_MAX_POSSIBLE_KEY];
416
 
  void *session;
 
424
  void *thd;
417
425
  const char *db_name, *table_name;
418
426
  const char *op_name;
419
427
  enum_mi_stats_method stats_method;
421
429
 
422
430
typedef struct st_sort_info
423
431
{
424
 
  drizzled::internal::my_off_t filelength,dupp,buff_length;
425
 
  drizzled::ha_rows max_records;
426
 
  uint32_t current_key, total_keys;
427
 
  drizzled::myf myf_rw;
428
 
  enum drizzled::data_file_type new_data_file_type;
 
432
  my_off_t filelength,dupp,buff_length;
 
433
  ha_rows max_records;
 
434
  uint current_key, total_keys;
 
435
  myf myf_rw;
 
436
  enum data_file_type new_data_file_type;
429
437
  MI_INFO *info;
430
438
  MI_CHECK *param;
431
 
  unsigned char *buff;
 
439
  uchar *buff;
432
440
  SORT_KEY_BLOCKS *key_block,*key_block_end;
433
441
  /* sync things */
434
 
  uint32_t got_error, threads_running;
 
442
  uint got_error, threads_running;
435
443
  pthread_mutex_t mutex;
436
444
  pthread_cond_t  cond;
437
445
} SORT_INFO;
439
447
/* functions in mi_check */
440
448
void myisamchk_init(MI_CHECK *param);
441
449
int chk_status(MI_CHECK *param, MI_INFO *info);
442
 
int chk_del(MI_CHECK *param, register MI_INFO *info, uint32_t test_flag);
 
450
int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag);
443
451
int chk_size(MI_CHECK *param, MI_INFO *info);
444
452
int chk_key(MI_CHECK *param, MI_INFO *info);
445
453
int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend);
451
459
int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
452
460
                      const char * name, int rep_quick);
453
461
int change_to_newfile(const char * filename, const char * old_ext,
454
 
                      const char * new_ext, uint32_t raid_chunks,
455
 
                      drizzled::myf myflags);
 
462
                      const char * new_ext, uint raid_chunks,
 
463
                      myf myflags);
456
464
void lock_memory(MI_CHECK *param);
457
465
void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
458
466
                               bool repair);
459
 
int update_state_info(MI_CHECK *param, MI_INFO *info,uint32_t update);
 
467
int update_state_info(MI_CHECK *param, MI_INFO *info,uint update);
460
468
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
461
 
                      uint64_t *unique, uint64_t *notnull,
 
469
                      uint64_t *unique, uint64_t *notnull, 
462
470
                      uint64_t records);
463
 
int filecopy(MI_CHECK *param, int to,int from,drizzled::internal::my_off_t start,
464
 
             drizzled::internal::my_off_t length, const char *type);
465
 
int movepoint(MI_INFO *info,unsigned char *record,drizzled::internal::my_off_t oldpos,
466
 
              drizzled::internal::my_off_t newpos, uint32_t prot_key);
 
471
int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
 
472
             my_off_t length, const char *type);
 
473
int movepoint(MI_INFO *info,uchar *record,my_off_t oldpos,
 
474
              my_off_t newpos, uint prot_key);
467
475
int write_data_suffix(SORT_INFO *sort_info, bool fix_datafile);
468
476
int test_if_almost_full(MI_INFO *info);
469
477
int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
470
 
bool mi_test_if_sort_rep(MI_INFO *info, drizzled::ha_rows rows, uint64_t key_map,
 
478
bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, uint64_t key_map,
471
479
                            bool force);
472
480
 
473
 
int mi_init_bulk_insert(MI_INFO *info, uint32_t cache_size, drizzled::ha_rows rows);
474
 
void mi_flush_bulk_insert(MI_INFO *info, uint32_t inx);
 
481
int mi_init_bulk_insert(MI_INFO *info, uint32_t cache_size, ha_rows rows);
 
482
void mi_flush_bulk_insert(MI_INFO *info, uint inx);
475
483
void mi_end_bulk_insert(MI_INFO *info);
 
484
int mi_assign_to_key_cache(MI_INFO *info, uint64_t key_map, 
 
485
                           KEY_CACHE *key_cache);
 
486
void mi_change_key_cache(KEY_CACHE *old_key_cache,
 
487
                         KEY_CACHE *new_key_cache);
476
488
int mi_preload(MI_INFO *info, uint64_t key_map, bool ignore_leaves);
477
489
 
478
 
#endif /* PLUGIN_MYISAM_MYISAM_H */
 
490
#ifdef  __cplusplus
 
491
}
 
492
#endif
 
493
#endif