~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/sort.c

  • Committer: Brian Aker
  • Date: 2008-07-06 07:32:43 UTC
  • Revision ID: brian@tangent.org-20080706073243-bah88yxqo79m2tpj
Next pass on fulltext.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
  them in sorted order through SORT_INFO functions.
19
19
*/
20
20
 
21
 
#include "fulltext.h"
 
21
#include "myisamdef.h"
22
22
#if defined(MSDOS) || defined(__WIN__)
23
23
#include <fcntl.h>
24
24
#else
157
157
      }
158
158
      while ((maxbuffer= (int) (records/(keys-1)+1)) != skr);
159
159
 
160
 
    if ((sort_keys=(uchar **)my_malloc(keys*(sort_length+sizeof(char*))+
161
 
                                       HA_FT_MAXBYTELEN, MYF(0))))
 
160
    if ((sort_keys=(uchar **)my_malloc(keys*(sort_length+sizeof(char*)), MYF(0))))
162
161
    {
163
162
      if (my_init_dynamic_array(&buffpek, sizeof(BUFFPEK), maxbuffer,
164
163
                             maxbuffer/2))
373
372
        while ((maxbuffer= (int) (idx/(keys-1)+1)) != skr);
374
373
      }
375
374
      if ((sort_keys= (uchar**)
376
 
           my_malloc(keys*(sort_length+sizeof(char*))+
377
 
                     ((sort_param->keyinfo->flag & HA_FULLTEXT) ?
378
 
                      HA_FT_MAXBYTELEN : 0), MYF(0))))
 
375
           my_malloc(keys*(sort_length+sizeof(char*)), MYF(0))))
379
376
      {
380
377
        if (my_init_dynamic_array(&sort_param->buffpek, sizeof(BUFFPEK),
381
378
                                  maxbuffer, maxbuffer/2))
621
618
             !my_b_read(&sinfo->tempfile_for_exceptions,(uchar*)&key_length,
622
619
                        sizeof(key_length)))
623
620
      {
624
 
        uchar ft_buf[HA_FT_MAXBYTELEN + HA_FT_WLEN + 10];
 
621
        uchar ft_buf[10];
625
622
        if (key_length > sizeof(ft_buf) ||
626
623
            my_b_read(&sinfo->tempfile_for_exceptions, (uchar*)ft_buf,
627
624
                      (uint)key_length) ||