~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisam.h

  • Committer: jay
  • Date: 2008-12-23 00:18:10 UTC
  • Revision ID: jay@piggy.tangent.org-20081223001810-026ibij22q2842k1
Had a --regex-replace by accident. Should have been --replace_column call.  Only showed up in make test, not running single test, because InnoDB key numbers were different with multiple test running.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <drizzled/base.h>
25
25
#ifndef _m_ctype_h
26
 
#include <m_ctype.h>
 
26
#include <mystrings/m_ctype.h>
27
27
#endif
28
28
#ifndef _keycache_h
29
29
#include "keycache.h"
30
30
#endif
31
 
#include <mysys/my_handler.h>
32
 
#include <drizzled/plugin.h>
 
31
#include <storage/myisam/my_handler.h>
 
32
#include <mysys/iocache.h>
33
33
 
34
34
/*
35
35
  Limit max keys according to HA_MAX_POSSIBLE_KEY
69
69
  This means that clearing of high keys is ignored, setting one high key
70
70
  sets all high keys.
71
71
*/
72
 
#define MI_KEYMAP_BITS      (8 * SIZEOF_LONG_LONG)
 
72
#define MI_KEYMAP_BITS      (64)
73
73
#define MI_KEYMAP_HIGH_MASK (1UL << (MI_KEYMAP_BITS - 1))
74
74
#define mi_get_mask_all_keys_active(_keys_) \
75
75
                            (((_keys_) < MI_KEYMAP_BITS) ? \
371
371
} SORT_KEY_BLOCKS;
372
372
 
373
373
 
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 
 
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
377
377
  each table analyze/repair operation in  MI_CHECK::stats_method.
378
378
*/
379
379
 
380
 
typedef enum 
 
380
typedef enum
381
381
{
382
382
  /* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
383
383
  MI_STATS_METHOD_NULLS_NOT_EQUAL,
407
407
  bool using_global_keycache, opt_lock_memory, opt_follow_links;
408
408
  bool retry_repair, force_sort;
409
409
  char temp_filename[FN_REFLEN],*isam_file_name;
410
 
  MY_TMPDIR *tmpdir;
411
410
  int tmpfile_createflag;
412
411
  myf myf_rw;
413
412
  IO_CACHE read_cache;
414
 
  
415
 
  /* 
 
413
 
 
414
  /*
416
415
    The next two are used to collect statistics, see update_key_parts for
417
416
    description.
418
417
  */
419
418
  uint64_t unique_count[MI_MAX_KEY_SEG+1];
420
419
  uint64_t notnull_count[MI_MAX_KEY_SEG+1];
421
 
  
 
420
 
422
421
  ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
423
422
  ulong rec_per_key_part[MI_MAX_KEY_SEG*HA_MAX_POSSIBLE_KEY];
424
 
  void *thd;
 
423
  void *session;
425
424
  const char *db_name, *table_name;
426
425
  const char *op_name;
427
426
  enum_mi_stats_method stats_method;
466
465
                               bool repair);
467
466
int update_state_info(MI_CHECK *param, MI_INFO *info,uint32_t update);
468
467
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
469
 
                      uint64_t *unique, uint64_t *notnull, 
 
468
                      uint64_t *unique, uint64_t *notnull,
470
469
                      uint64_t records);
471
470
int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
472
471
             my_off_t length, const char *type);
481
480
int mi_init_bulk_insert(MI_INFO *info, uint32_t cache_size, ha_rows rows);
482
481
void mi_flush_bulk_insert(MI_INFO *info, uint32_t inx);
483
482
void mi_end_bulk_insert(MI_INFO *info);
484
 
int mi_assign_to_key_cache(MI_INFO *info, uint64_t key_map, 
 
483
int mi_assign_to_key_cache(MI_INFO *info, uint64_t key_map,
485
484
                           KEY_CACHE *key_cache);
486
485
void mi_change_key_cache(KEY_CACHE *old_key_cache,
487
486
                         KEY_CACHE *new_key_cache);