~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/sort.c

  • Committer: Brian Aker
  • Date: 2008-12-09 17:33:02 UTC
  • mfrom: (656.1.54 devel)
  • Revision ID: brian@tangent.org-20081209173302-aptngvc7efxnatnt
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
      }
153
153
      while ((maxbuffer= (records/(keys-1)+1)) != skr);
154
154
 
155
 
    if ((sort_keys=(unsigned char **)my_malloc(keys*(sort_length+sizeof(char*)), MYF(0))))
 
155
    if ((sort_keys=(unsigned char **)malloc(keys*(sort_length+sizeof(char*)))))
156
156
    {
157
157
      if (my_init_dynamic_array(&buffpek, sizeof(BUFFPEK), maxbuffer,
158
158
                             maxbuffer/2))
366
366
        while ((maxbuffer= (idx/(keys-1)+1)) != skr);
367
367
      }
368
368
      if ((sort_keys= (unsigned char**)
369
 
           my_malloc(keys*(sort_length+sizeof(char*)), MYF(0))))
 
369
           malloc(keys*(sort_length+sizeof(char*)))))
370
370
      {
371
371
        if (my_init_dynamic_array(&sort_param->buffpek, sizeof(BUFFPEK),
372
372
                                  maxbuffer, maxbuffer/2))
550
550
        length=param->sort_buffer_length;
551
551
        while (length >= MIN_SORT_MEMORY)
552
552
        {
553
 
          if ((mergebuf= my_malloc(length, MYF(0))))
 
553
          if ((mergebuf= malloc(length)))
554
554
              break;
555
555
          length=length*3/4;
556
556
        }