~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisamchk.c

  • Committer: Brian Aker
  • Date: 2008-10-06 05:57:49 UTC
  • Revision ID: brian@tangent.org-20081006055749-svg700gciuqi0zu1
Remove all of uchar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
                           bool write_info, bool update_index);
76
76
static int sort_record_index(MI_SORT_PARAM *sort_param, MI_INFO *info,
77
77
                             MI_KEYDEF *keyinfo,
78
 
                             my_off_t page,uchar *buff,uint sortkey,
 
78
                             my_off_t page,unsigned char *buff,uint sortkey,
79
79
                             File new_file, bool update_index);
80
80
 
81
81
MI_CHECK check_param;
1403
1403
  uint key;
1404
1404
  MI_KEYDEF *keyinfo;
1405
1405
  File new_file;
1406
 
  uchar *temp_buff;
 
1406
  unsigned char *temp_buff;
1407
1407
  ha_rows old_record_count;
1408
1408
  MYISAM_SHARE *share=info->s;
1409
1409
  char llbuff[22],llbuff2[22];
1452
1452
    goto err;
1453
1453
  info->opt_flag|=WRITE_CACHE_USED;
1454
1454
 
1455
 
  if (!(temp_buff=(uchar*) my_alloca((uint) keyinfo->block_length)))
 
1455
  if (!(temp_buff=(unsigned char*) my_alloca((uint) keyinfo->block_length)))
1456
1456
  {
1457
1457
    mi_check_print_error(param,"Not enough memory for key block");
1458
1458
    goto err;
1488
1488
  for (key=0 ; key < share->base.keys ; key++)
1489
1489
    share->keyinfo[key].flag|= HA_SORT_ALLOWS_SAME;
1490
1490
 
1491
 
  if (my_pread(share->kfile,(uchar*) temp_buff,
 
1491
  if (my_pread(share->kfile,(unsigned char*) temp_buff,
1492
1492
               (uint) keyinfo->block_length,
1493
1493
               share->state.key_root[sort_key],
1494
1494
               MYF(MY_NABP+MY_WME)))
1551
1551
  }
1552
1552
  if (temp_buff)
1553
1553
  {
1554
 
    my_afree((uchar*) temp_buff);
 
1554
    my_afree((unsigned char*) temp_buff);
1555
1555
  }
1556
1556
  void * rec_buff_ptr= mi_get_rec_buff_ptr(info, sort_param.record);
1557
1557
  if (rec_buff_ptr != NULL)
1571
1571
 
1572
1572
static int sort_record_index(MI_SORT_PARAM *sort_param,MI_INFO *info,
1573
1573
                             MI_KEYDEF *keyinfo,
1574
 
                             my_off_t page, uchar *buff, uint sort_key,
 
1574
                             my_off_t page, unsigned char *buff, uint sort_key,
1575
1575
                             File new_file,bool update_index)
1576
1576
{
1577
1577
  uint  nod_flag,used_length,key_length;
1578
 
  uchar *temp_buff,*keypos,*endpos;
 
1578
  unsigned char *temp_buff,*keypos,*endpos;
1579
1579
  my_off_t next_page,rec_pos;
1580
 
  uchar lastkey[MI_MAX_KEY_BUFF];
 
1580
  unsigned char lastkey[MI_MAX_KEY_BUFF];
1581
1581
  char llbuff[22];
1582
1582
  SORT_INFO *sort_info= sort_param->sort_info;
1583
1583
  MI_CHECK *param=sort_info->param;
1587
1587
 
1588
1588
  if (nod_flag)
1589
1589
  {
1590
 
    if (!(temp_buff=(uchar*) my_alloca((uint) keyinfo->block_length)))
 
1590
    if (!(temp_buff=(unsigned char*) my_alloca((uint) keyinfo->block_length)))
1591
1591
    {
1592
1592
      mi_check_print_error(param,"Not Enough memory");
1593
1593
      return(-1);
1601
1601
    if (nod_flag)
1602
1602
    {
1603
1603
      next_page=_mi_kpos(nod_flag,keypos);
1604
 
      if (my_pread(info->s->kfile,(uchar*) temp_buff,
 
1604
      if (my_pread(info->s->kfile,(unsigned char*) temp_buff,
1605
1605
                  (uint) keyinfo->block_length, next_page,
1606
1606
                   MYF(MY_NABP+MY_WME)))
1607
1607
      {
1640
1640
  }
1641
1641
  /* Clear end of block to get better compression if the table is backuped */
1642
1642
  memset(buff+used_length, 0, keyinfo->block_length-used_length);
1643
 
  if (my_pwrite(info->s->kfile,(uchar*) buff,(uint) keyinfo->block_length,
 
1643
  if (my_pwrite(info->s->kfile,(unsigned char*) buff,(uint) keyinfo->block_length,
1644
1644
                page,param->myf_rw))
1645
1645
  {
1646
1646
    mi_check_print_error(param,"%d when updating keyblock",my_errno);
1647
1647
    goto err;
1648
1648
  }
1649
1649
  if (temp_buff)
1650
 
    my_afree((uchar*) temp_buff);
 
1650
    my_afree((unsigned char*) temp_buff);
1651
1651
  return(0);
1652
1652
err:
1653
1653
  if (temp_buff)
1654
 
    my_afree((uchar*) temp_buff);
 
1654
    my_afree((unsigned char*) temp_buff);
1655
1655
  return(1);
1656
1656
} /* sort_record_index */
1657
1657