~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisamchk.c

  • Committer: Brian Aker
  • Date: 2008-08-09 06:20:11 UTC
  • Revision ID: brian@tangent.org-20080809062011-vkyz8gszh6jpk3ga
Converted myisam away from my_bool

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
static void descript(MI_CHECK *param, register MI_INFO *info, char * name);
74
74
static int mi_sort_records(MI_CHECK *param, register MI_INFO *info,
75
75
                           char * name, uint sort_key,
76
 
                           my_bool write_info, my_bool update_index);
 
76
                           bool write_info, bool update_index);
77
77
static int sort_record_index(MI_SORT_PARAM *sort_param, MI_INFO *info,
78
78
                             MI_KEYDEF *keyinfo,
79
79
                             my_off_t page,uchar *buff,uint sortkey,
80
 
                             File new_file, my_bool update_index);
 
80
                             File new_file, bool update_index);
81
81
 
82
82
MI_CHECK check_param;
83
83
 
758
758
  MI_INFO *info;
759
759
  File datafile;
760
760
  char llbuff[22],llbuff2[22];
761
 
  my_bool state_updated=0;
 
761
  bool state_updated=0;
762
762
  MYISAM_SHARE *share;
763
763
 
764
764
  param->out_flag=error=param->warning_printed=param->error_printed=
824
824
  */
825
825
  if (param->testflag & (T_FAST | T_CHECK_ONLY_CHANGED))
826
826
  {
827
 
    my_bool need_to_check= mi_is_crashed(info) || share->state.open_count != 0;
 
827
    bool need_to_check= mi_is_crashed(info) || share->state.open_count != 0;
828
828
 
829
829
    if ((param->testflag & (T_REP_ANY | T_SORT_RECORDS)) &&
830
830
        ((share->state.changed & (STATE_CHANGED | STATE_CRASHED |
979
979
          We can't update the index in mi_sort_records if we have a
980
980
          prefix compressed or fulltext index
981
981
        */
982
 
        my_bool update_index=1;
 
982
        bool update_index=1;
983
983
        for (key=0 ; key < share->base.keys; key++)
984
984
          if (share->keyinfo[key].flag & (HA_BINARY_PACK_KEY))
985
985
            update_index=0;
986
986
 
987
987
        error=mi_sort_records(param,info,filename,param->opt_sort_key,
988
988
                           /* what is the following parameter for ? */
989
 
                              (my_bool) !(param->testflag & T_REP),
 
989
                              (bool) !(param->testflag & T_REP),
990
990
                              update_index);
991
991
        datafile=info->dfile;   /* This is now locked */
992
992
        if (!error && !update_index)
1069
1069
  if ((param->testflag & T_AUTO_INC) ||
1070
1070
      ((param->testflag & T_REP_ANY) && info->s->base.auto_key))
1071
1071
    update_auto_increment_key(param, info,
1072
 
                              (my_bool) !test(param->testflag & T_AUTO_INC));
 
1072
                              (bool) !test(param->testflag & T_AUTO_INC));
1073
1073
 
1074
1074
  if (!(param->testflag & T_DESCRIPT))
1075
1075
  {
1318
1318
    for (key=0,uniqueinfo= &share->uniqueinfo[0] ;
1319
1319
         key < share->state.header.uniques; key++, uniqueinfo++)
1320
1320
    {
1321
 
      my_bool new_row=0;
 
1321
      bool new_row=0;
1322
1322
      char null_bit[8],null_pos[8];
1323
1323
      printf("%-8d%-5d",key+1,uniqueinfo->key+1);
1324
1324
      for (keyseg=uniqueinfo->seg ; keyseg->type != HA_KEYTYPE_END ; keyseg++)
1397
1397
static int mi_sort_records(MI_CHECK *param,
1398
1398
                           register MI_INFO *info, char * name,
1399
1399
                           uint sort_key,
1400
 
                           my_bool write_info,
1401
 
                           my_bool update_index)
 
1400
                           bool write_info,
 
1401
                           bool update_index)
1402
1402
{
1403
1403
  int got_error;
1404
1404
  uint key;
1571
1571
static int sort_record_index(MI_SORT_PARAM *sort_param,MI_INFO *info,
1572
1572
                             MI_KEYDEF *keyinfo,
1573
1573
                             my_off_t page, uchar *buff, uint sort_key,
1574
 
                             File new_file,my_bool update_index)
 
1574
                             File new_file,bool update_index)
1575
1575
{
1576
1576
  uint  nod_flag,used_length,key_length;
1577
1577
  uchar *temp_buff,*keypos,*endpos;