~jaypipes/drizzle/subscriber-plugin

« back to all changes in this revision

Viewing changes to drizzled/optimizer/range.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
#include "drizzled/optimizer/sel_arg.h"
136
136
#include "drizzled/optimizer/range_param.h"
137
137
#include "drizzled/records.h"
 
138
#include "drizzled/internal/my_sys.h"
 
139
#include "drizzled/internal/iocache.h"
138
140
 
139
141
#include "drizzled/temporal.h" /* Needed in get_mm_leaf() for timestamp -> datetime comparisons */
140
142
 
620
622
 
621
623
  if (head->sort.io_cache)
622
624
  {
623
 
    select->file= *head->sort.io_cache;
624
 
    select->records=(ha_rows) (select->file.end_of_file/
 
625
    memcpy(select->file, head->sort.io_cache, sizeof(IO_CACHE));
 
626
    select->records=(ha_rows) (select->file->end_of_file/
625
627
                               head->cursor->ref_length);
626
628
    delete head->sort.io_cache;
627
629
    head->sort.io_cache=0;
634
636
  :
635
637
    quick(NULL),
636
638
    cond(NULL),
 
639
    file(static_cast<IO_CACHE *>(sql_calloc(sizeof(IO_CACHE)))),
637
640
    free_cond(false)
638
641
{
639
642
  quick_keys.reset();
640
643
  needed_reg.reset();
641
 
  my_b_clear(&file);
 
644
  my_b_clear(file);
642
645
}
643
646
 
644
647
 
652
655
    delete cond;
653
656
    cond= 0;
654
657
  }
655
 
  close_cached_file(&file);
 
658
  close_cached_file(file);
656
659
}
657
660
 
658
661