~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/sort.c

  • Committer: Monty Taylor
  • Date: 2008-10-02 01:31:53 UTC
  • mfrom: (398.1.6 codestyle-new)
  • Revision ID: monty@inaugust.com-20081002013153-b097om921cd3j1pn
MergedĀ fromĀ stdint-includes-fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
  sort_keys= (uchar **) NULL; error= 1;
125
125
  maxbuffer=1;
126
126
 
127
 
  memavl=max(sortbuff_size,MIN_SORT_MEMORY);
 
127
  memavl=cmax(sortbuff_size,MIN_SORT_MEMORY);
128
128
  records=      info->sort_info->max_records;
129
129
  sort_length=  info->key_length;
130
130
 
333
333
    memset(&sort_param->unique, 0,  sizeof(sort_param->unique));
334
334
    sort_keys= (uchar **) NULL;
335
335
 
336
 
    memavl=       max(sort_param->sortbuff_size, MIN_SORT_MEMORY);
 
336
    memavl=       cmax(sort_param->sortbuff_size, MIN_SORT_MEMORY);
337
337
    idx=          (uint)sort_param->sort_info->max_records;
338
338
    sort_length=  sort_param->key_length;
339
339
    maxbuffer=    1;
782
782
  register uint count;
783
783
  uint length;
784
784
 
785
 
  if ((count=(uint) min((ha_rows) buffpek->max_keys,buffpek->count)))
 
785
  if ((count=(uint) cmin((ha_rows) buffpek->max_keys,buffpek->count)))
786
786
  {
787
787
    if (my_pread(fromfile->file,(uchar*) buffpek->base,
788
788
                 (length= sort_length*count),buffpek->file_pos,MYF_RW))
803
803
  uint idx;
804
804
  uchar *buffp;
805
805
 
806
 
  if ((count=(uint) min((ha_rows) buffpek->max_keys,buffpek->count)))
 
806
  if ((count=(uint) cmin((ha_rows) buffpek->max_keys,buffpek->count)))
807
807
  {
808
808
    buffp = buffpek->base;
809
809