~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/range.cc

  • Committer: Monty Taylor
  • Date: 2011-03-08 06:21:17 UTC
  • mfrom: (2223.1.3 build)
  • Revision ID: mordred@inaugust.com-20110308062117-4i2syq1gqtmcmcyk
Merge Olaf - XID and Dynamic_array refactoring
Merge Andrew - Optimizer bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
3341
3341
  optimizer::SEL_ARG *next= NULL;
3342
3342
  ulong use_count=key1->use_count;
3343
3343
 
3344
 
  if (key1->elements != 1)
 
3344
  if (key1->size() != 1)
3345
3345
  {
3346
 
    key2->use_count+=key1->elements-1; //psergey: why we don't count that key1 has n-k-p?
3347
 
    key2->increment_use_count((int) key1->elements-1);
 
3346
    key2->use_count+=key1->size()-1; //psergey: why we don't count that key1 has n-k-p?
 
3347
    key2->increment_use_count((int) key1->size()-1);
3348
3348
  }
3349
3349
  if (key1->type == optimizer::SEL_ARG::MAYBE_KEY)
3350
3350
  {
4354
4354
  quick->qr_traversal_ctx.first=  (optimizer::QuickRange**)quick->ranges.buffer;
4355
4355
  quick->qr_traversal_ctx.cur=    (optimizer::QuickRange**)quick->ranges.buffer;
4356
4356
  quick->qr_traversal_ctx.last=   quick->qr_traversal_ctx.cur +
4357
 
                                  quick->ranges.elements;
 
4357
                                  quick->ranges.size();
4358
4358
  return &quick->qr_traversal_ctx;
4359
4359
}
4360
4360