~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/quick_range_select.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-23 11:44:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2348.
  • Revision ID: olafvdspek@gmail.com-20110623114430-no355yypk4y3icqb
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
  rev_it= rev_ranges.begin();
464
464
 
465
465
  /* Remove EQ_RANGE flag for keys that are not using the full key */
466
 
  for (vector<optimizer::QuickRange *>::iterator it= rev_ranges.begin();
467
 
       it != rev_ranges.end();
468
 
       ++it)
 
466
  BOOST_FOREACH(QuickRange* it, rev_ranges)
469
467
  {
470
 
    optimizer::QuickRange *r= *it;
471
 
    if ((r->flag & EQ_RANGE) &&
472
 
        head->key_info[index].key_length != r->max_length)
 
468
    if ((it->flag & EQ_RANGE) && head->key_info[index].key_length != it->max_length)
473
469
    {
474
 
      r->flag&= ~EQ_RANGE;
 
470
      it->flag&= ~EQ_RANGE;
475
471
    }
476
472
  }
477
473
  q->dont_free= 1; // Don't free shared mem