~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2010-10-08 20:13:50 UTC
  • mfrom: (1823.1.3 trunk-drizzle)
  • Revision ID: brian@tangent.org-20101008201350-bmjpgakk12zmyw10
Overall merge of Padraig

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "drizzled/table.h"
21
21
#include "drizzled/key.h"
22
22
#include "drizzled/field/blob.h"
 
23
#include "drizzled/util/test.h"
 
24
 
 
25
#include <boost/dynamic_bitset.hpp>
23
26
 
24
27
#include <string>
25
28
 
399
402
    FALSE  Otherwise
400
403
*/
401
404
 
402
 
bool is_key_used(Table *table, uint32_t idx, const MyBitmap *fields)
 
405
bool is_key_used(Table *table, uint32_t idx, const boost::dynamic_bitset<>& fields)
403
406
{
404
 
  table->tmp_set.clearAll();
405
 
  table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);
406
 
  if (bitmap_is_overlapping(&table->tmp_set, fields))
 
407
  table->tmp_set.reset();
 
408
  table->mark_columns_used_by_index_no_reset(idx, table->tmp_set);
 
409
  if (table->tmp_set.is_subset_of(fields))
407
410
    return 1;
408
411
 
409
412
  /*