~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 08:22:57 UTC
  • mto: This revision was merged to the branch mainline in revision 78.
  • Revision ID: brian@tangent.org-20080706082257-gni9cj1cdjlqomz0
Final removal of fulltext core from myisam.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
                                BUFFPEK *Fb, BUFFPEK *Tb);
71
71
static int  merge_index(MI_SORT_PARAM *,uint,uchar **,BUFFPEK *, int,
72
72
                              IO_CACHE *);
73
 
static int flush_ft_buf(MI_SORT_PARAM *info);
74
73
 
75
74
static int  write_keys_varlen(MI_SORT_PARAM *info,uchar **sort_keys,
76
75
                                    uint count, BUFFPEK *buffpek,
214
213
      goto err;                                 /* purecov: inspected */
215
214
  }
216
215
 
217
 
  if (flush_ft_buf(info) || flush_pending_blocks(info))
 
216
  if (flush_pending_blocks(info))
218
217
    goto err;
219
218
 
220
219
  if (my_b_inited(&tempfile_for_exceptions))
513
512
          printf("Key %d  - Dumping %u keys\n",sinfo->key+1, sinfo->keys);
514
513
          fflush(stdout);
515
514
        }
516
 
        if (write_index(sinfo, sinfo->sort_keys, sinfo->keys) ||
517
 
            flush_ft_buf(sinfo) || flush_pending_blocks(sinfo))
 
515
        if (write_index(sinfo, sinfo->sort_keys, sinfo->keys) || flush_pending_blocks(sinfo))
518
516
          got_error=1;
519
517
      }
520
518
      if (!got_error && param->testflag & T_STATISTICS)
593
591
      if (merge_index(sinfo, keys, (uchar **)mergebuf,
594
592
                      dynamic_element(&sinfo->buffpek,0,BUFFPEK *),
595
593
                      maxbuffer,&sinfo->tempfile) ||
596
 
          flush_ft_buf(sinfo) ||
597
594
          flush_pending_blocks(sinfo))
598
595
      {
599
596
        got_error=1;
1032
1029
  DBUG_RETURN(0);
1033
1030
} /* merge_index */
1034
1031
 
1035
 
static int
1036
 
flush_ft_buf(MI_SORT_PARAM *info)
1037
 
{
1038
 
  int err=0;
1039
 
  if (info->sort_info->ft_buf)
1040
 
  {
1041
 
    err=sort_ft_buf_flush(info);
1042
 
    my_free((uchar*)info->sort_info->ft_buf, MYF(0));
1043
 
    info->sort_info->ft_buf=0;
1044
 
  }
1045
 
  return err;
1046
 
}
1047