~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/filesort.cc

Merge of Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <drizzled/table_list.h>
31
31
 
32
32
#include <queue>
33
 
#include <bitset>
34
33
 
35
34
using namespace std;
36
35
 
454
453
  Session *session= current_session;
455
454
  volatile Session::killed_state *killed= &session->killed;
456
455
  handler *file;
457
 
  bitset<MAX_FIELDS> *save_read_set, *save_write_set;
 
456
  MY_BITMAP *save_read_set, *save_write_set;
458
457
 
459
458
  idx=indexpos=0;
460
459
  error=quick_select=0;
490
489
  save_read_set=  sort_form->read_set;
491
490
  save_write_set= sort_form->write_set;
492
491
  /* Set up temporary column read map for columns used by sort */
493
 
  sort_form->tmp_set.reset();
 
492
  bitmap_clear_all(&sort_form->tmp_set);
494
493
  /* Temporary set for register_used_fields and register_field_in_read_map */
495
494
  sort_form->read_set= &sort_form->tmp_set;
496
495
  register_used_fields(param);
921
920
{
922
921
  register SORT_FIELD *sort_field;
923
922
  Table *table=param->sort_form;
924
 
  bitset<MAX_FIELDS> *bitmap= table->read_set;
925
923
 
926
924
  for (sort_field= param->local_sortorder ;
927
925
       sort_field != param->end ;
931
929
    if ((field= sort_field->field))
932
930
    {
933
931
      if (field->table == table)
934
 
        bitmap->set(field->field_index);
 
932
        table->setReadSet(field->field_index);
935
933
    }
936
934
    else
937
935
    {                                           // Item
945
943
    SORT_ADDON_FIELD *addonf= param->addon_field;
946
944
    Field *field;
947
945
    for ( ; (field= addonf->field) ; addonf++)
948
 
      bitmap->set(field->field_index);
 
946
      table->setReadSet(field->field_index);
949
947
  }
950
948
  else
951
949
  {