~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-04-08 20:42:29 UTC
  • mto: (971.1.63 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: osullivan.padraig@gmail.com-20090408204229-okmeoxsqw21eav2o
Initial work on removing MY_BITMAP from the Drizzle code base. For a start,
I'm concentrating on removing the MY_BITMAP structures from the table
structure defined in drizzled/table.h

I'm replacing it with std::bitset for the moment unless I can think of a
better replacement. Still need to work on re-factoring the rest of the code
to work correctly with these changes that I have made.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
#include <drizzled/check_stack_overrun.h>
47
47
#include <drizzled/lock.h>
48
48
 
 
49
#include <bitset>
 
50
 
 
51
using namespace std;
 
52
 
49
53
 
50
54
/**
51
55
  @defgroup Data_Dictionary Data Dictionary
3612
3616
{
3613
3617
  if (session->mark_used_columns != MARK_COLUMNS_NONE)
3614
3618
  {
3615
 
    MY_BITMAP *current_bitmap, *other_bitmap;
 
3619
    bitset<MAX_FIELDS> *current_bitmap, *other_bitmap;
3616
3620
 
3617
3621
    /*
3618
3622
      We always want to register the used keys, as the column bitmap may have
3633
3637
      other_bitmap=   table->read_set;
3634
3638
    }
3635
3639
 
3636
 
    if (bitmap_fast_test_and_set(current_bitmap, field->field_index))
 
3640
    /* TODO: does this do test and set appropriately? */
 
3641
    if (current_bitmap->test(field->field_index) && current_bitmap->set(field->field_index))
3637
3642
    {
3638
3643
      if (session->mark_used_columns == MARK_COLUMNS_WRITE)
3639
3644
        session->dup_field= field;