~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 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:
3637
3637
      other_bitmap=   table->read_set;
3638
3638
    }
3639
3639
 
3640
 
    /* TODO: does this do test and set appropriately? */
3641
 
    if (current_bitmap->test(field->field_index) && current_bitmap->set(field->field_index))
 
3640
    if (current_bitmap->test(field->field_index))
3642
3641
    {
 
3642
      current_bitmap->set(field->field_index);
3643
3643
      if (session->mark_used_columns == MARK_COLUMNS_WRITE)
3644
3644
        session->dup_field= field;
3645
3645
      return;
3646
3646
    }
 
3647
    current_bitmap->set(field->field_index);
3647
3648
    if (table->get_fields_in_item_tree)
3648
3649
      field->flags|= GET_FIXED_FIELDS_FLAG;
3649
3650
    table->used_fields++;
3792
3793
        */
3793
3794
        if ((session->mark_used_columns != MARK_COLUMNS_WRITE) &&
3794
3795
            (not (*field_ptr)->is_stored))
3795
 
          bitmap_set_bit((*field_ptr)->table->write_set, (*field_ptr)->field_index);
 
3796
          (*field_ptr)->table->write_set->set((*field_ptr)->field_index);
3796
3797
      }
3797
3798
    }
3798
3799
    *cached_field_index_ptr= field_ptr - table->field;
3972
3973
        {
3973
3974
          Table *table= field_to_set->table;
3974
3975
          if (session->mark_used_columns == MARK_COLUMNS_READ)
3975
 
            bitmap_set_bit(table->read_set, field_to_set->field_index);
 
3976
            table->read_set->set(field_to_set->field_index);
3976
3977
          else
3977
 
            bitmap_set_bit(table->write_set, field_to_set->field_index);
 
3978
            table->write_set->set(field_to_set->field_index);
3978
3979
        }
3979
3980
      }
3980
3981
  }
4722
4723
      {
4723
4724
        Table *table_1= nj_col_1->table_ref->table;
4724
4725
        /* Mark field_1 used for table cache. */
4725
 
        bitmap_set_bit(table_1->read_set, field_1->field_index);
 
4726
        table_1->read_set->set(field_1->field_index);
4726
4727
        table_1->covering_keys.intersect(field_1->part_of_key);
4727
4728
        table_1->merge_keys.merge(field_1->part_of_key);
4728
4729
      }
4730
4731
      {
4731
4732
        Table *table_2= nj_col_2->table_ref->table;
4732
4733
        /* Mark field_2 used for table cache. */
4733
 
        bitmap_set_bit(table_2->read_set, field_2->field_index);
 
4734
        table_2->read_set->set(field_2->field_index);
4734
4735
        table_2->covering_keys.intersect(field_2->part_of_key);
4735
4736
        table_2->merge_keys.merge(field_2->part_of_key);
4736
4737
      }
5524
5525
      if ((field= field_iterator.field()))
5525
5526
      {
5526
5527
        /* Mark fields as used to allow storage engine to optimze access */
5527
 
        bitmap_set_bit(field->table->read_set, field->field_index);
 
5528
        field->table->read_set->set(field->field_index);
5528
5529
        /*
5529
5530
          Mark virtual fields for write and others that the virtual fields
5530
5531
          depend on for read.
5534
5535
          Item *vcol_item= field->vcol_info->expr_item;
5535
5536
          assert(vcol_item);
5536
5537
          vcol_item->walk(&Item::register_field_in_read_map, 1, (unsigned char *) 0);
5537
 
          bitmap_set_bit(field->table->write_set, field->field_index);
 
5538
          field->table->write_set->set(field->field_index);
5538
5539
        }
5539
5540
        if (table)
5540
5541
        {