~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/filesort.cc

  • Committer: Brian Aker
  • Date: 2008-08-19 15:11:04 UTC
  • mfrom: (327.2.6 drizzle-good)
  • Revision ID: brian@gir.tangent.org-20080819151104-uxk5lgoaj0fwgx9z
Merge of Brian's tree to main tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                       uint maxbuffer,IO_CACHE *tempfile,
49
49
                       IO_CACHE *outfile);
50
50
static bool save_index(SORTPARAM *param,uchar **sort_keys, uint count, 
51
 
                       FILESORT_INFO *table_sort);
 
51
                       filesort_info_st *table_sort);
52
52
static uint suffix_length(uint32_t string_length);
53
53
static uint sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
54
54
                       bool *multi_byte_charset);
106
106
  SORTPARAM param;
107
107
  bool multi_byte_charset;
108
108
 
109
 
  FILESORT_INFO table_sort;
110
 
  TABLE_LIST *tab= table->pos_in_table_list;
 
109
  filesort_info_st table_sort;
 
110
  TableList *tab= table->pos_in_table_list;
111
111
  Item_subselect *subselect= tab ? tab->containing_subselect() : 0;
112
112
 
113
113
  DRIZZLE_FILESORT_START();
123
123
    QUICK_INDEX_MERGE_SELECT. Work with a copy and put it back at the end 
124
124
    when index_merge select has finished with it.
125
125
  */
126
 
  memcpy(&table_sort, &table->sort, sizeof(FILESORT_INFO));
 
126
  memcpy(&table_sort, &table->sort, sizeof(filesort_info_st));
127
127
  table->sort.io_cache= NULL;
128
128
  
129
129
  outfile= table_sort.io_cache;
316
316
    statistic_add(thd->status_var.filesort_rows,
317
317
                  (uint32_t) records, &LOCK_status);
318
318
  *examined_rows= param.examined_rows;
319
 
  memcpy(&table->sort, &table_sort, sizeof(FILESORT_INFO));
 
319
  memcpy(&table->sort, &table_sort, sizeof(filesort_info_st));
320
320
  DRIZZLE_FILESORT_END();
321
321
  return(error ? HA_POS_ERROR : records);
322
322
} /* filesort */
957
957
 
958
958
 
959
959
static bool save_index(SORTPARAM *param, uchar **sort_keys, uint count, 
960
 
                       FILESORT_INFO *table_sort)
 
960
                       filesort_info_st *table_sort)
961
961
{
962
962
  uint offset,res_length;
963
963
  uchar *to;