~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

  • Committer: Jay Pipes
  • Date: 2009-08-20 20:29:18 UTC
  • mfrom: (1103.6.6 refactor-bitmap-class)
  • mto: This revision was merged to the branch mainline in revision 1121.
  • Revision ID: jpipes@serialcoder-20090820202918-39ey4uyvwh9z4ya5
Merge Padraig's refactoring of MY_BITMAP struct to a proper class interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  Table *next;
71
71
  Table *prev;
72
72
 
73
 
  MY_BITMAP *read_set; /* Active column sets */
74
 
  MY_BITMAP *write_set; /* Active column sets */
 
73
  MyBitmap *read_set; /* Active column sets */
 
74
  MyBitmap *write_set; /* Active column sets */
75
75
 
76
76
  uint32_t tablenr;
77
77
  uint32_t db_stat; /**< information about the file as in handler.h */
78
78
 
79
 
  MY_BITMAP def_read_set; /**< Default read set of columns */
80
 
  MY_BITMAP def_write_set; /**< Default write set of columns */
81
 
  MY_BITMAP tmp_set; /* Not sure about this... */
 
79
  MyBitmap def_read_set; /**< Default read set of columns */
 
80
  MyBitmap def_write_set; /**< Default write set of columns */
 
81
  MyBitmap tmp_set; /* Not sure about this... */
82
82
 
83
83
  Session       *in_use; /**< Pointer to the current session using this object */
84
84
 
437
437
  bool fill_item_list(List<Item> *item_list) const;
438
438
  void clear_column_bitmaps(void);
439
439
  void prepare_for_position(void);
440
 
  void mark_columns_used_by_index_no_reset(uint32_t index, MY_BITMAP *map);
 
440
  void mark_columns_used_by_index_no_reset(uint32_t index, MyBitmap *map);
441
441
  void mark_columns_used_by_index_no_reset(uint32_t index);
442
442
  void mark_columns_used_by_index(uint32_t index);
443
443
  void restore_column_maps_after_mark_index();
445
445
  void mark_columns_needed_for_update(void);
446
446
  void mark_columns_needed_for_delete(void);
447
447
  void mark_columns_needed_for_insert(void);
448
 
  inline void column_bitmaps_set(MY_BITMAP *read_set_arg,
449
 
                                 MY_BITMAP *write_set_arg)
 
448
  inline void column_bitmaps_set(MyBitmap *read_set_arg,
 
449
                                 MyBitmap *write_set_arg)
450
450
  {
451
451
    read_set= read_set_arg;
452
452
    write_set= write_set_arg;
466
466
 
467
467
  void restore_column_map(my_bitmap_map *old);
468
468
 
469
 
  my_bitmap_map *use_all_columns(MY_BITMAP *bitmap);
 
469
  my_bitmap_map *use_all_columns(MyBitmap *bitmap);
470
470
  inline void use_all_columns()
471
471
  {
472
472
    column_bitmaps_set(&s->all_set, &s->all_set);
481
481
  /* Both of the below should go away once we can move this bit to the field objects */
482
482
  inline bool isReadSet(uint32_t index)
483
483
  {
484
 
    return bitmap_is_set(read_set, index);
 
484
    return read_set->isBitSet(index);
485
485
  }
486
486
 
487
487
  inline void setReadSet(uint32_t index)
488
488
  {
489
 
    bitmap_set_bit(read_set, index);
 
489
    read_set->setBit(index);
490
490
  }
491
491
 
492
492
  inline void setReadSet()
493
493
  {
494
 
    bitmap_set_all(read_set);
 
494
    read_set->setAll();
495
495
  }
496
496
 
497
497
  inline bool isWriteSet(uint32_t index)
498
498
  {
499
 
    return bitmap_is_set(write_set, index);
 
499
    return write_set->isBitSet(index);
500
500
  }
501
501
 
502
502
  inline void setWriteSet(uint32_t index)
503
503
  {
504
 
    bitmap_set_bit(write_set, index);
 
504
    write_set->setBit(index);
505
505
  }
506
506
 
507
507
  inline void setWriteSet()
508
508
  {
509
 
    bitmap_set_all(write_set);
 
509
    write_set->setAll();
510
510
  }
511
511
 
512
512
  /* Is table open or should be treated as such by name-locking? */