Eneboo - Documentación para desarrolladores
src/libmysql_std/include/myisam.h
Ir a la documentación de este archivo.
00001 /* Copyright (C) 2000 MySQL AB
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
00015 
00016 /* This file should be included when using myisam_funktions */
00017 
00018 #ifndef _myisam_h
00019 #define _myisam_h
00020 #ifdef  __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 #ifndef _my_base_h
00025 #include <my_base.h>
00026 #endif
00027 #ifndef _m_ctype_h
00028 #include <m_ctype.h>
00029 #endif
00030 #ifndef _keycache_h
00031 #include "keycache.h"
00032 #endif
00033 #include "my_handler.h"
00034 
00035 /*
00036   There is a hard limit for the maximum number of keys as there are only
00037   8 bits in the index file header for the number of keys in a table.
00038   This means that 0..255 keys can exist for a table. The idea of
00039   MI_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
00040   a MyISAM table for which one has more keys than MyISAM is normally
00041   compiled for. If you don't have this, you will get a core dump when
00042   running myisamchk compiled for 128 keys on a table with 255 keys.
00043 */
00044 #define MI_MAX_POSSIBLE_KEY         255             /* For myisam_chk */
00045 #if MAX_INDEXES > MI_MAX_POSSIBLE_KEY
00046 #define MI_MAX_KEY                  MI_MAX_POSSIBLE_KEY /* Max allowed keys */
00047 #else
00048 #define MI_MAX_KEY                  MAX_INDEXES         /* Max allowed keys */
00049 #endif
00050 
00051 #define MI_MAX_POSSIBLE_KEY_BUFF    (1024+6+6)      /* For myisam_chk */
00052 /*
00053   The following defines can be increased if necessary.
00054   But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
00055 */
00056 #define MI_MAX_KEY_LENGTH           1000            /* Max length in bytes */
00057 #define MI_MAX_KEY_SEG              16              /* Max segments for key */
00058 
00059 #define MI_MAX_KEY_BUFF  (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
00060 #define MI_MAX_MSG_BUF      1024 /* used in CHECK TABLE, REPAIR TABLE */
00061 #define MI_NAME_IEXT    ".MYI"
00062 #define MI_NAME_DEXT    ".MYD"
00063 /* Max extra space to use when sorting keys */
00064 #define MI_MAX_TEMP_LENGTH      2*1024L*1024L*1024L
00065 
00066 /* Possible values for myisam_block_size (must be power of 2) */
00067 #define MI_KEY_BLOCK_LENGTH     1024    /* default key block length */
00068 #define MI_MIN_KEY_BLOCK_LENGTH 1024    /* Min key block length */
00069 #define MI_MAX_KEY_BLOCK_LENGTH 16384
00070 
00071 #define mi_portable_sizeof_char_ptr 8
00072 
00073 /*
00074   In the following macros '_keyno_' is 0 .. keys-1.
00075   If there can be more keys than bits in the key_map, the highest bit
00076   is for all upper keys. They cannot be switched individually.
00077   This means that clearing of high keys is ignored, setting one high key
00078   sets all high keys.
00079 */
00080 #define MI_KEYMAP_BITS      (8 * SIZEOF_LONG_LONG)
00081 #define MI_KEYMAP_HIGH_MASK (ULL(1) << (MI_KEYMAP_BITS - 1))
00082 #define mi_get_mask_all_keys_active(_keys_) \
00083                             (((_keys_) < MI_KEYMAP_BITS) ? \
00084                              ((ULL(1) << (_keys_)) - ULL(1)) : \
00085                              (~ ULL(0)))
00086 
00087 #if MI_MAX_KEY > MI_KEYMAP_BITS
00088 
00089 #define mi_is_key_active(_keymap_,_keyno_) \
00090                             (((_keyno_) < MI_KEYMAP_BITS) ? \
00091                              test((_keymap_) & (ULL(1) << (_keyno_))) : \
00092                              test((_keymap_) & MI_KEYMAP_HIGH_MASK))
00093 #define mi_set_key_active(_keymap_,_keyno_) \
00094                             (_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
00095                                           (ULL(1) << (_keyno_)) : \
00096                                           MI_KEYMAP_HIGH_MASK)
00097 #define mi_clear_key_active(_keymap_,_keyno_) \
00098                             (_keymap_)&= (((_keyno_) < MI_KEYMAP_BITS) ? \
00099                                           (~ (ULL(1) << (_keyno_))) : \
00100                                           (~ (ULL(0))) /*ignore*/ )
00101 
00102 #else
00103 
00104 #define mi_is_key_active(_keymap_,_keyno_) \
00105                             test((_keymap_) & (ULL(1) << (_keyno_)))
00106 #define mi_set_key_active(_keymap_,_keyno_) \
00107                             (_keymap_)|= (ULL(1) << (_keyno_))
00108 #define mi_clear_key_active(_keymap_,_keyno_) \
00109                             (_keymap_)&= (~ (ULL(1) << (_keyno_)))
00110 
00111 #endif
00112 
00113 #define mi_is_any_key_active(_keymap_) \
00114                             test((_keymap_))
00115 #define mi_is_all_keys_active(_keymap_,_keys_) \
00116                             ((_keymap_) == mi_get_mask_all_keys_active(_keys_))
00117 #define mi_set_all_keys_active(_keymap_,_keys_) \
00118                             (_keymap_)= mi_get_mask_all_keys_active(_keys_)
00119 #define mi_clear_all_keys_active(_keymap_) \
00120                             (_keymap_)= 0
00121 #define mi_intersect_keys_active(_to_,_from_) \
00122                             (_to_)&= (_from_)
00123 #define mi_is_any_intersect_keys_active(_keymap1_,_keys_,_keymap2_) \
00124                             ((_keymap1_) & (_keymap2_) & \
00125                              mi_get_mask_all_keys_active(_keys_))
00126 #define mi_copy_keys_active(_to_,_maxkeys_,_from_) \
00127                             (_to_)= (mi_get_mask_all_keys_active(_maxkeys_) & \
00128                                      (_from_))
00129 
00130         /* Param to/from mi_info */
00131 
00132 typedef struct st_mi_isaminfo           /* Struct from h_info */
00133 {
00134   ha_rows records;                      /* Records in database */
00135   ha_rows deleted;                      /* Deleted records in database */
00136   my_off_t recpos;                      /* Pos for last used record */
00137   my_off_t newrecpos;                   /* Pos if we write new record */
00138   my_off_t dupp_key_pos;                /* Position to record with dupp key */
00139   my_off_t data_file_length,            /* Length of data file */
00140            max_data_file_length,
00141            index_file_length,
00142            max_index_file_length,
00143            delete_length;
00144   ulong reclength;                      /* Recordlength */
00145   ulong mean_reclength;                 /* Mean recordlength (if packed) */
00146   ulonglong auto_increment;
00147   ulonglong key_map;                    /* Which keys are used */
00148   char  *data_file_name, *index_file_name;
00149   uint  keys;                           /* Number of keys in use */
00150   uint  options;                        /* HA_OPTION_... used */
00151   int   errkey,                         /* With key was dupplicated on err */
00152         sortkey;                        /* clustered by this key */
00153   File  filenr;                         /* (uniq) filenr for datafile */
00154   time_t create_time;                   /* When table was created */
00155   time_t check_time;
00156   time_t update_time;
00157   uint  reflength;
00158   ulong record_offset;
00159   ulong *rec_per_key;                   /* for sql optimizing */
00160   uint raid_type,raid_chunks;
00161   ulong raid_chunksize;
00162 } MI_ISAMINFO;
00163 
00164 
00165 typedef struct st_mi_create_info
00166 {
00167   const char *index_file_name, *data_file_name; /* If using symlinks */
00168   ha_rows max_rows;
00169   ha_rows reloc_rows;
00170   ulonglong auto_increment;
00171   ulonglong data_file_length;
00172   ulonglong key_file_length;
00173   uint raid_type,raid_chunks;
00174   ulong raid_chunksize;
00175   uint old_options;
00176   uint8 language;
00177   my_bool with_auto_increment;
00178 } MI_CREATE_INFO;
00179 
00180 struct st_myisam_info;                  /* For referense */
00181 struct st_mi_isam_share;
00182 typedef struct st_myisam_info MI_INFO;
00183 struct st_mi_s_param;
00184 
00185 typedef struct st_mi_keydef             /* Key definition with open & info */
00186 {
00187   struct st_mi_isam_share *share;       /* Pointer to base (set in mi_open) */
00188   uint16 keysegs;                       /* Number of key-segment */
00189   uint16 flag;                          /* NOSAME, PACK_USED */
00190 
00191   uint8  key_alg;                       /* BTREE, RTREE */
00192   uint16 block_length;                  /* Length of keyblock (auto) */
00193   uint16 underflow_block_length;        /* When to execute underflow */
00194   uint16 keylength;                     /* Tot length of keyparts (auto) */
00195   uint16 minlength;                     /* min length of (packed) key (auto) */
00196   uint16 maxlength;                     /* max length of (packed) key (auto) */
00197   uint16 block_size;                    /* block_size (auto) */
00198   uint32 version;                       /* For concurrent read/write */
00199 
00200   HA_KEYSEG *seg,*end;
00201   int (*bin_search)(struct st_myisam_info *info,struct st_mi_keydef *keyinfo,
00202                     uchar *page,uchar *key,
00203                     uint key_len,uint comp_flag,uchar * *ret_pos,
00204                     uchar *buff, my_bool *was_last_key);
00205   uint (*get_key)(struct st_mi_keydef *keyinfo,uint nod_flag,uchar * *page,
00206                   uchar *key);
00207   int (*pack_key)(struct st_mi_keydef *keyinfo,uint nod_flag,uchar *next_key,
00208                   uchar *org_key, uchar *prev_key, uchar *key,
00209                   struct st_mi_s_param *s_temp);
00210   void (*store_key)(struct st_mi_keydef *keyinfo, uchar *key_pos,
00211                     struct st_mi_s_param *s_temp);
00212   int (*ck_insert)(struct st_myisam_info *inf, uint k_nr, uchar *k, uint klen);
00213   int (*ck_delete)(struct st_myisam_info *inf, uint k_nr, uchar *k, uint klen);
00214 } MI_KEYDEF;
00215 
00216 
00217 #define MI_UNIQUE_HASH_LENGTH   4
00218 
00219 typedef struct st_unique_def            /* Segment definition of unique */
00220 {
00221   uint16 keysegs;                       /* Number of key-segment */
00222   uchar key;                            /* Mapped to which key */
00223   uint8 null_are_equal;
00224   HA_KEYSEG *seg,*end;
00225 } MI_UNIQUEDEF;
00226 
00227 typedef struct st_mi_decode_tree        /* Decode huff-table */
00228 {
00229   uint16 *table;
00230   uint   quick_table_bits;
00231   byte   *intervalls;
00232 } MI_DECODE_TREE;
00233 
00234 
00235 struct st_mi_bit_buff;
00236 
00237 /*
00238   Note that null markers should always be first in a row !
00239   When creating a column, one should only specify:
00240   type, length, null_bit and null_pos
00241 */
00242 
00243 typedef struct st_columndef             /* column information */
00244 {
00245   int16  type;                          /* en_fieldtype */
00246   uint16 length;                        /* length of field */
00247   uint32 offset;                        /* Offset to position in row */
00248   uint8  null_bit;                      /* If column may be 0 */
00249   uint16 null_pos;                      /* position for null marker */
00250 
00251 #ifndef NOT_PACKED_DATABASES
00252   void (*unpack)(struct st_columndef *rec,struct st_mi_bit_buff *buff,
00253                  uchar *start,uchar *end);
00254   enum en_fieldtype base_type;
00255   uint space_length_bits,pack_type;
00256   MI_DECODE_TREE *huff_tree;
00257 #endif
00258 } MI_COLUMNDEF;
00259 
00260 /* invalidator function reference for Query Cache */
00261 typedef void (* invalidator_by_filename)(const char * filename);
00262 
00263 extern my_string myisam_log_filename;           /* Name of logfile */
00264 extern ulong myisam_block_size;
00265 extern ulong myisam_concurrent_insert;
00266 extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
00267 extern my_off_t myisam_max_temp_length;
00268 extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
00269 
00270         /* Prototypes for myisam-functions */
00271 
00272 extern int mi_close(struct st_myisam_info *file);
00273 extern int mi_delete(struct st_myisam_info *file,const byte *buff);
00274 extern struct st_myisam_info *mi_open(const char *name,int mode,
00275                                       uint wait_if_locked);
00276 extern int mi_panic(enum ha_panic_function function);
00277 extern int mi_rfirst(struct st_myisam_info *file,byte *buf,int inx);
00278 extern int mi_rkey(struct st_myisam_info *file,byte *buf,int inx,
00279                    const byte *key,
00280                    uint key_len, enum ha_rkey_function search_flag);
00281 extern int mi_rlast(struct st_myisam_info *file,byte *buf,int inx);
00282 extern int mi_rnext(struct st_myisam_info *file,byte *buf,int inx);
00283 extern int mi_rnext_same(struct st_myisam_info *info, byte *buf);
00284 extern int mi_rprev(struct st_myisam_info *file,byte *buf,int inx);
00285 extern int mi_rrnd(struct st_myisam_info *file,byte *buf, my_off_t pos);
00286 extern int mi_scan_init(struct st_myisam_info *file);
00287 extern int mi_scan(struct st_myisam_info *file,byte *buf);
00288 extern int mi_rsame(struct st_myisam_info *file,byte *record,int inx);
00289 extern int mi_rsame_with_pos(struct st_myisam_info *file,byte *record,
00290                              int inx, my_off_t pos);
00291 extern int mi_update(struct st_myisam_info *file,const byte *old,
00292                      byte *new_record);
00293 extern int mi_write(struct st_myisam_info *file,byte *buff);
00294 extern my_off_t mi_position(struct st_myisam_info *file);
00295 extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint flag);
00296 extern int mi_lock_database(struct st_myisam_info *file,int lock_type);
00297 extern int mi_create(const char *name,uint keys,MI_KEYDEF *keydef,
00298                      uint columns, MI_COLUMNDEF *columndef,
00299                      uint uniques, MI_UNIQUEDEF *uniquedef,
00300                      MI_CREATE_INFO *create_info, uint flags);
00301 extern int mi_delete_table(const char *name);
00302 extern int mi_rename(const char *from, const char *to);
00303 extern int mi_extra(struct st_myisam_info *file,
00304                     enum ha_extra_function function,
00305                     void *extra_arg);
00306 extern ha_rows mi_records_in_range(struct st_myisam_info *info,int inx,
00307                                    key_range *min_key, key_range *max_key);
00308 extern int mi_log(int activate_log);
00309 extern int mi_is_changed(struct st_myisam_info *info);
00310 extern int mi_delete_all_rows(struct st_myisam_info *info);
00311 extern ulong _mi_calc_blob_length(uint length , const byte *pos);
00312 extern uint mi_get_pointer_length(ulonglong file_length, uint def);
00313 
00314 /* this is used to pass to mysql_myisamchk_table -- by Sasha Pachev */
00315 
00316 #define   MYISAMCHK_REPAIR 1  /* equivalent to myisamchk -r */
00317 #define   MYISAMCHK_VERIFY 2  /* Verify, run repair if failure */
00318 
00319 /*
00320   Definitions needed for myisamchk.c
00321 
00322   Entries marked as "QQ to be removed" are NOT used to
00323   pass check/repair options to mi_check.c. They are used
00324   internally by myisamchk.c or/and ha_myisam.cc and should NOT
00325   be stored together with other flags. They should be removed
00326   from the following list to make addition of new flags possible.
00327 */
00328 
00329 #define T_AUTO_INC              1
00330 #define T_AUTO_REPAIR           2              /* QQ to be removed */
00331 #define T_BACKUP_DATA           4
00332 #define T_CALC_CHECKSUM         8
00333 #define T_CHECK                 16             /* QQ to be removed */
00334 #define T_CHECK_ONLY_CHANGED    32             /* QQ to be removed */
00335 #define T_CREATE_MISSING_KEYS   64
00336 #define T_DESCRIPT              128
00337 #define T_DONT_CHECK_CHECKSUM   256
00338 #define T_EXTEND                512
00339 #define T_FAST                  (1L << 10)     /* QQ to be removed */
00340 #define T_FORCE_CREATE          (1L << 11)     /* QQ to be removed */
00341 #define T_FORCE_UNIQUENESS      (1L << 12)
00342 #define T_INFO                  (1L << 13)
00343 #define T_MEDIUM                (1L << 14)
00344 #define T_QUICK                 (1L << 15)     /* QQ to be removed */
00345 #define T_READONLY              (1L << 16)     /* QQ to be removed */
00346 #define T_REP                   (1L << 17)
00347 #define T_REP_BY_SORT           (1L << 18)     /* QQ to be removed */
00348 #define T_REP_PARALLEL          (1L << 19)     /* QQ to be removed */
00349 #define T_RETRY_WITHOUT_QUICK   (1L << 20)
00350 #define T_SAFE_REPAIR           (1L << 21)
00351 #define T_SILENT                (1L << 22)
00352 #define T_SORT_INDEX            (1L << 23)     /* QQ to be removed */
00353 #define T_SORT_RECORDS          (1L << 24)     /* QQ to be removed */
00354 #define T_STATISTICS            (1L << 25)
00355 #define T_UNPACK                (1L << 26)
00356 #define T_UPDATE_STATE          (1L << 27)
00357 #define T_VERBOSE               (1L << 28)
00358 #define T_VERY_SILENT           (1L << 29)
00359 #define T_WAIT_FOREVER          (1L << 30)
00360 #define T_WRITE_LOOP            ((ulong) 1L << 31)
00361 
00362 #define T_REP_ANY               (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
00363 
00364 /*
00365   Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
00366   to mi_check.c follows:
00367 */
00368 
00369 #define TT_USEFRM               1
00370 #define TT_FOR_UPGRADE          2
00371 
00372 #define O_NEW_INDEX     1               /* Bits set in out_flag */
00373 #define O_NEW_DATA      2
00374 #define O_DATA_LOST     4
00375 
00376 /* these struct is used by my_check to tell it what to do */
00377 
00378 typedef struct st_sort_key_blocks               /* Used when sorting */
00379 {
00380   uchar *buff,*end_pos;
00381   uchar lastkey[MI_MAX_POSSIBLE_KEY_BUFF];
00382   uint last_length;
00383   int inited;
00384 } SORT_KEY_BLOCKS;
00385 
00386 
00387 /* 
00388   MyISAM supports several statistics collection methods. Currently statistics 
00389   collection method is not stored in MyISAM file and has to be specified for 
00390   each table analyze/repair operation in  MI_CHECK::stats_method.
00391 */
00392 
00393 typedef enum 
00394 {
00395   /* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
00396   MI_STATS_METHOD_NULLS_NOT_EQUAL,
00397   /* Treat NULLs as equal when collecting statistics (like 4.0 did) */
00398   MI_STATS_METHOD_NULLS_EQUAL,
00399   /* Ignore NULLs - count only tuples without NULLs in the index components */
00400   MI_STATS_METHOD_IGNORE_NULLS
00401 } enum_mi_stats_method;
00402 
00403 typedef struct st_mi_check_param
00404 {
00405   ulonglong auto_increment_value;
00406   ulonglong max_data_file_length;
00407   ulonglong keys_in_use;
00408   ulonglong max_record_length;
00409   my_off_t search_after_block;
00410   my_off_t new_file_pos,key_file_blocks;
00411   my_off_t keydata,totaldata,key_blocks,start_check_pos;
00412   ha_rows total_records,total_deleted;
00413   ha_checksum record_checksum,glob_crc;
00414   ulong use_buffers,read_buffer_length,write_buffer_length,
00415         sort_buffer_length,sort_key_blocks;
00416   uint out_flag,warning_printed,error_printed,verbose;
00417   uint opt_sort_key,total_files,max_level;
00418   uint testflag, key_cache_block_size;
00419   uint8 language;
00420   my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
00421   my_bool retry_repair, force_sort;
00422   char temp_filename[FN_REFLEN],*isam_file_name;
00423   MY_TMPDIR *tmpdir;
00424   int tmpfile_createflag;
00425   myf myf_rw;
00426   IO_CACHE read_cache;
00427   
00428   /* 
00429     The next two are used to collect statistics, see update_key_parts for
00430     description.
00431   */
00432   ulonglong unique_count[MI_MAX_KEY_SEG+1];
00433   ulonglong notnull_count[MI_MAX_KEY_SEG+1];
00434   
00435   ha_checksum key_crc[MI_MAX_POSSIBLE_KEY];
00436   ulong rec_per_key_part[MI_MAX_KEY_SEG*MI_MAX_POSSIBLE_KEY];
00437   void *thd;
00438   const char *db_name, *table_name;
00439   const char *op_name;
00440   enum_mi_stats_method stats_method;
00441 } MI_CHECK;
00442 
00443 typedef struct st_sort_ft_buf
00444 {
00445   uchar *buf, *end;
00446   int   count;
00447   uchar lastkey[MI_MAX_KEY_BUFF];
00448 } SORT_FT_BUF;
00449 
00450 typedef struct st_sort_info
00451 {
00452   my_off_t filelength,dupp,buff_length;
00453   ha_rows max_records;
00454   uint current_key, total_keys;
00455   myf myf_rw;
00456   enum data_file_type new_data_file_type;
00457   MI_INFO *info;
00458   MI_CHECK *param;
00459   char *buff;
00460   SORT_KEY_BLOCKS *key_block,*key_block_end;
00461   SORT_FT_BUF *ft_buf;
00462   /* sync things */
00463   uint got_error, threads_running;
00464 #ifdef THREAD
00465   pthread_mutex_t mutex;
00466   pthread_cond_t  cond;
00467 #endif
00468 } SORT_INFO;
00469 
00470 /* functions in mi_check */
00471 void myisamchk_init(MI_CHECK *param);
00472 int chk_status(MI_CHECK *param, MI_INFO *info);
00473 int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag);
00474 int chk_size(MI_CHECK *param, MI_INFO *info);
00475 int chk_key(MI_CHECK *param, MI_INFO *info);
00476 int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend);
00477 int mi_repair(MI_CHECK *param, register MI_INFO *info,
00478               my_string name, int rep_quick);
00479 int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name);
00480 int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
00481                       const char * name, int rep_quick);
00482 int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
00483                       const char * name, int rep_quick);
00484 int change_to_newfile(const char * filename, const char * old_ext,
00485                       const char * new_ext, uint raid_chunks,
00486                       myf myflags);
00487 int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type,
00488               const char *filetype, const char *filename);
00489 void lock_memory(MI_CHECK *param);
00490 void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
00491                                my_bool repair);
00492 int update_state_info(MI_CHECK *param, MI_INFO *info,uint update);
00493 void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
00494                       ulonglong *unique, ulonglong *notnull, 
00495                       ulonglong records);
00496 int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
00497              my_off_t length, const char *type);
00498 int movepoint(MI_INFO *info,byte *record,my_off_t oldpos,
00499               my_off_t newpos, uint prot_key);
00500 int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile);
00501 int test_if_almost_full(MI_INFO *info);
00502 int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
00503 void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
00504 my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, ulonglong key_map,
00505                             my_bool force);
00506 
00507 int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows);
00508 void mi_flush_bulk_insert(MI_INFO *info, uint inx);
00509 void mi_end_bulk_insert(MI_INFO *info);
00510 int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map, 
00511                            KEY_CACHE *key_cache);
00512 void mi_change_key_cache(KEY_CACHE *old_key_cache,
00513                          KEY_CACHE *new_key_cache);
00514 int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves);
00515 
00516 #ifdef  __cplusplus
00517 }
00518 #endif
00519 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'