~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/filesort.cc

Fixed bashism.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
  error= 1;
139
139
  memset(&param, 0, sizeof(param));
140
140
  param.sort_length= sortlength(session, sortorder, s_length, &multi_byte_charset);
141
 
  param.ref_length= table->cursor->ref_length;
 
141
  param.ref_length= table->file->ref_length;
142
142
  param.addon_field= 0;
143
143
  param.addon_length= 0;
144
 
  if (!(table->cursor->ha_table_flags() & HA_FAST_KEY_READ) && !sort_positions)
 
144
  if (!(table->file->ha_table_flags() & HA_FAST_KEY_READ) && !sort_positions)
145
145
  {
146
146
    /*
147
147
      Get the descriptors of all fields whose values are appended
186
186
  if (select && select->quick && select->quick->records > 0L)
187
187
  {
188
188
    records= min((ha_rows) (select->quick->records*2+EXTRA_RECORDS*2),
189
 
                 table->cursor->stats.records)+EXTRA_RECORDS;
 
189
                 table->file->stats.records)+EXTRA_RECORDS;
190
190
    selected_records_file=0;
191
191
  }
192
192
  else
193
193
#endif
194
194
  {
195
 
    records= table->cursor->estimate_rows_upper_bound();
 
195
    records= table->file->estimate_rows_upper_bound();
196
196
    /*
197
197
      If number of records is not known, use as much of sort buffer
198
198
      as possible.
460
460
  idx=indexpos=0;
461
461
  error=quick_select=0;
462
462
  sort_form=param->sort_form;
463
 
  file= sort_form->cursor;
 
463
  file= sort_form->file;
464
464
  ref_length=param->ref_length;
465
465
  ref_pos= ref_buff;
466
466
  quick_select=select && select->quick;