~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_check.cc

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
*/
42
42
 
43
43
#include "myisam_priv.h"
44
 
#include "drizzled/internal/m_string.h"
 
44
#include <drizzled/internal/m_string.h>
45
45
#include <stdarg.h>
46
46
#ifdef HAVE_SYS_VADVISE_H
47
47
#include <sys/vadvise.h>
53
53
#include <sys/mman.h>
54
54
#endif
55
55
#include <drizzled/util/test.h>
56
 
#include "drizzled/error.h"
 
56
#include <drizzled/error.h>
57
57
 
58
58
#include <algorithm>
59
59
 
721
721
{
722
722
  int flag;
723
723
  uint32_t used_length,comp_flag,nod_flag,key_length=0;
724
 
  unsigned char key[HA_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos;
 
724
  unsigned char key[HA_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*endpos;
725
725
  my_off_t next_page,record;
726
726
  char llbuff[22];
727
727
  uint32_t diff_pos[2];
765
765
                         temp_buff,keys,key_checksum,level+1))
766
766
        goto err;
767
767
    }
768
 
    old_keypos=keypos;
769
768
    if (keypos >= endpos ||
770
769
        (key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,key)) == 0)
771
770
      break;
874
873
int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
875
874
{
876
875
  int   error,got_error,flag;
877
 
  uint  key, left_length= 0, b_type,field;
 
876
  uint  key, left_length= 0, b_type;
878
877
  ha_rows records, del_blocks;
879
878
  my_off_t used, empty, pos, splits, start_recpos= 0,
880
879
           del_length, link_used, start_block;
882
881
  char llbuff[22],llbuff2[22],llbuff3[22];
883
882
  ha_checksum intern_record_checksum;
884
883
  ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY];
885
 
  bool static_row_size;
886
884
  MI_KEYDEF *keyinfo;
887
885
  MI_BLOCK_INFO block_info;
888
886
 
905
903
  got_error=error=0;
906
904
  empty=info->s->pack.header_length;
907
905
 
908
 
  /* Check how to calculate checksum of rows */
909
 
  static_row_size=1;
910
 
  if (info->s->data_file_type == COMPRESSED_RECORD)
911
 
  {
912
 
    for (field=0 ; field < info->s->base.fields ; field++)
913
 
    {
914
 
      if (info->s->rec[field].base_type == FIELD_BLOB ||
915
 
          info->s->rec[field].base_type == FIELD_VARCHAR)
916
 
      {
917
 
        static_row_size=0;
918
 
        break;
919
 
      }
920
 
    }
921
 
  }
922
 
 
923
906
  pos=my_b_tell(&param->read_cache);
924
907
  memset(key_checksum, 0, info->s->base.keys * sizeof(key_checksum[0]));
925
908
  while (pos < info->state->data_file_length)
1611
1594
      info->dfile=new_file= -1;
1612
1595
      if (change_to_newfile(share->data_file_name,MI_NAME_DEXT,
1613
1596
                            DATA_TMP_EXT, share->base.raid_chunks,
1614
 
                            (param->testflag & T_BACKUP_DATA ?
1615
 
                             MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
 
1597
                            MYF(0)) ||
1616
1598
          mi_open_datafile(info,share,-1))
1617
1599
        got_error=1;
1618
1600
    }
2296
2278
      info->dfile=new_file= -1;
2297
2279
      if (change_to_newfile(share->data_file_name,MI_NAME_DEXT,
2298
2280
                            DATA_TMP_EXT, share->base.raid_chunks,
2299
 
                            (param->testflag & T_BACKUP_DATA ?
2300
 
                             MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
 
2281
                            MYF(0)) ||
2301
2282
          mi_open_datafile(info,share,-1))
2302
2283
        got_error=1;
2303
2284
    }