~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-04-08 23:01:10 UTC
  • mto: (971.1.63 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: osullivan.padraig@gmail.com-20090408230110-k3x7ix1321lfclp7
Various small cleanups to numerous files to now have calls to the correct
methods in std::bitset instead of calls to functions related to MY_BITSET
e.g. bitmap->test(pos) instead of is_bitmap_set(MY_BITMAP, pos)
Quite a number of files are modified in this commit but most of the
modifications are quite small in nature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "drizzled/field/blob.h"
23
23
 
24
24
#include <string>
 
25
#include <bitset>
25
26
 
26
27
using namespace std;
27
28
 
389
390
    FALSE  Otherwise
390
391
*/
391
392
 
392
 
bool is_key_used(Table *table, uint32_t idx, const bitmap<MAX_FIELDS> *fields)
 
393
bool is_key_used(Table *table, uint32_t idx, const bitset<MAX_FIELDS> *fields)
393
394
{
394
395
  table->tmp_set.reset();
395
396
  table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);
396
 
  /* TODO: change this to use std::bitset */
397
 
  if (bitmap_is_overlapping(&table->tmp_set, fields))
 
397
  /* Check if 2 bitsets are overlapping */
 
398
  bitset<MAX_FIELDS> tmp= *fields & table->tmp_set;
 
399
  if (tmp.any())
398
400
    return 1;
399
401
 
400
402
  /*