~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_check.cc

  • Committer: Andrew Hutchings
  • Date: 2011-03-29 09:33:49 UTC
  • mto: (2257.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: andrew@linuxjedi.co.uk-20110329093349-oz4cgb9f7l1032m3
Fix Drizzle to compile in GCC 4.6 (which fires warnings and therefore errors if a variable is set and not read)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)