~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisam.h

  • Committer: Monty Taylor
  • Date: 2008-08-05 19:01:20 UTC
  • mto: (266.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: monty@inaugust.com-20080805190120-tsuziqz2mfqcw7pe
Removed libmysyslt.la, made mysys a noinst_ and made everything use it. It's
not a standalone lib, there's no reason to pretend otherwise.

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