~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

  • Committer: Brian Aker
  • Date: 2010-10-08 14:22:02 UTC
  • mfrom: (1802.16.21 bug621875)
  • mto: This revision was merged to the branch mainline in revision 1824.
  • Revision ID: brian@tangent.org-20101008142202-96maf31n9odkc13n
Merge Padraig

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#define DRIZZLED_TABLE_H
25
25
 
26
26
#include <string>
 
27
#include <boost/dynamic_bitset.hpp>
27
28
 
28
29
#include "drizzled/order.h"
29
30
#include "drizzled/filesort_info.h"
130
131
    prev= arg;
131
132
  }
132
133
 
133
 
  MyBitmap *read_set; /* Active column sets */
134
 
  MyBitmap *write_set; /* Active column sets */
 
134
  boost::dynamic_bitset<> *read_set; /* Active column sets */
 
135
  boost::dynamic_bitset<> *write_set; /* Active column sets */
135
136
 
136
137
  uint32_t tablenr;
137
138
  uint32_t db_stat; /**< information about the cursor as in Cursor.h */
138
139
 
139
 
  MyBitmap def_read_set; /**< Default read set of columns */
140
 
  MyBitmap def_write_set; /**< Default write set of columns */
141
 
  MyBitmap tmp_set; /* Not sure about this... */
 
140
  boost::dynamic_bitset<> def_read_set; /**< Default read set of columns */
 
141
  boost::dynamic_bitset<> def_write_set; /**< Default write set of columns */
 
142
  boost::dynamic_bitset<> tmp_set; /* Not sure about this... */
142
143
 
143
144
  Session *in_use; /**< Pointer to the current session using this object */
144
145
  Session *getSession()
416
417
  }
417
418
 
418
419
  /* For TMP tables, should be pulled out as a class */
419
 
  void setup_tmp_table_column_bitmaps(unsigned char *bitmaps);
 
420
  void setup_tmp_table_column_bitmaps();
420
421
  bool create_myisam_tmp_table(KeyInfo *keyinfo,
421
422
                               MI_COLUMNDEF *start_recinfo,
422
423
                               MI_COLUMNDEF **recinfo,
457
458
  bool fill_item_list(List<Item> *item_list) const;
458
459
  void clear_column_bitmaps(void);
459
460
  void prepare_for_position(void);
460
 
  void mark_columns_used_by_index_no_reset(uint32_t index, MyBitmap *map);
 
461
  void mark_columns_used_by_index_no_reset(uint32_t index, boost::dynamic_bitset<>& bitmap);
461
462
  void mark_columns_used_by_index_no_reset(uint32_t index);
462
463
  void mark_columns_used_by_index(uint32_t index);
463
464
  void restore_column_maps_after_mark_index();
465
466
  void mark_columns_needed_for_update(void);
466
467
  void mark_columns_needed_for_delete(void);
467
468
  void mark_columns_needed_for_insert(void);
468
 
  inline void column_bitmaps_set(MyBitmap *read_set_arg,
469
 
                                 MyBitmap *write_set_arg)
470
 
  {
471
 
    read_set= read_set_arg;
472
 
    write_set= write_set_arg;
473
 
  }
474
 
 
475
 
  void restore_column_map(my_bitmap_map *old);
476
 
 
477
 
  my_bitmap_map *use_all_columns(MyBitmap *bitmap);
 
469
  void column_bitmaps_set(boost::dynamic_bitset<>& read_set_arg,
 
470
                          boost::dynamic_bitset<>& write_set_arg);
 
471
 
 
472
  void restore_column_map(const boost::dynamic_bitset<>& old);
 
473
 
 
474
  const boost::dynamic_bitset<> use_all_columns(boost::dynamic_bitset<>& map);
478
475
  inline void use_all_columns()
479
476
  {
480
 
    column_bitmaps_set(&s->all_set, &s->all_set);
 
477
    column_bitmaps_set(s->all_set, s->all_set);
481
478
  }
482
479
 
483
480
  inline void default_column_bitmaps()
489
486
  /* Both of the below should go away once we can move this bit to the field objects */
490
487
  inline bool isReadSet(uint32_t index)
491
488
  {
492
 
    return read_set->isBitSet(index);
 
489
    return read_set->test(index);
493
490
  }
494
491
 
495
492
  inline void setReadSet(uint32_t index)
496
493
  {
497
 
    read_set->setBit(index);
 
494
    read_set->set(index);
498
495
  }
499
496
 
500
497
  inline void setReadSet()
501
498
  {
502
 
    read_set->setAll();
 
499
    read_set->set();
503
500
  }
504
501
 
505
502
  inline void clearReadSet(uint32_t index)
506
503
  {
507
 
    read_set->clearBit(index);
 
504
    read_set->reset(index);
508
505
  }
509
506
 
510
507
  inline void clearReadSet()
511
508
  {
512
 
    read_set->clearAll();
 
509
    read_set->reset();
513
510
  }
514
511
 
515
512
  inline bool isWriteSet(uint32_t index)
516
513
  {
517
 
    return write_set->isBitSet(index);
 
514
    return write_set->test(index);
518
515
  }
519
516
 
520
517
  inline void setWriteSet(uint32_t index)
521
518
  {
522
 
    write_set->setBit(index);
 
519
    write_set->set(index);
523
520
  }
524
521
 
525
522
  inline void setWriteSet()
526
523
  {
527
 
    write_set->setAll();
 
524
    write_set->set();
528
525
  }
529
526
 
530
527
  inline void clearWriteSet(uint32_t index)
531
528
  {
532
 
    write_set->clearBit(index);
 
529
    write_set->reset(index);
533
530
  }
534
531
 
535
532
  inline void clearWriteSet()
536
533
  {
537
 
    write_set->clearAll();
 
534
    write_set->reset();
538
535
  }
539
536
 
540
537
  /* Is table open or should be treated as such by name-locking? */