~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-10-02 19:49:54 UTC
  • mto: (1823.1.1 trunk-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1824.
  • Revision ID: osullivan.padraig@gmail.com-20101002194954-2sqp7a6szfgdl11l
Removal of all MyBitmap from the code base. Compiles but test failures exist now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
401
401
    FALSE  Otherwise
402
402
*/
403
403
 
404
 
bool is_key_used(Table *table, uint32_t idx, const MyBitmap *fields)
405
 
{
406
 
  table->tmp_set.clearAll();
407
 
  table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);
408
 
  if (bitmap_is_overlapping(&table->tmp_set, fields))
409
 
    return 1;
410
 
 
411
 
  /*
412
 
    If table handler has primary key as part of the index, check that primary
413
 
    key is not updated
414
 
  */
415
 
  if (idx != table->getShare()->getPrimaryKey() && table->getShare()->hasPrimaryKey() &&
416
 
      (table->cursor->getEngine()->check_flag(HTON_BIT_PRIMARY_KEY_IN_READ_INDEX)))
417
 
  {
418
 
    return is_key_used(table, table->getShare()->getPrimaryKey(), fields);
419
 
  }
420
 
  return 0;
421
 
}
422
 
 
423
 
 
424
404
bool is_key_used(Table *table, uint32_t idx, const boost::dynamic_bitset<>& fields)
425
405
{
426
 
  table->tmp_set.clearAll();
427
 
  table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);
428
 
  if (bitmap_is_overlapping(&table->tmp_set, fields))
 
406
  table->tmp_set.reset();
 
407
  table->mark_columns_used_by_index_no_reset(idx, table->tmp_set);
 
408
  if (bitmap_is_overlapping(table->tmp_set, fields))
429
409
    return 1;
430
410
 
431
411
  /*