~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.h

  • Committer: Yoshinori Sano
  • Date: 2008-11-30 10:01:57 UTC
  • mto: (632.1.1 devel)
  • mto: This revision was merged to the branch mainline in revision 634.
  • Revision ID: ysano@139.1.168.192.in-addr.arpa-20081130100157-u7l3sucyvteuyk30
Replace "uint_32 flags" member of handlerton with std::bitset. Add some TODOs as comments for this change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
/* Bits to show what an alter table will do */
37
37
#include <drizzled/sql_bitmap.h>
38
38
 
 
39
#include <bitset>
 
40
 
 
41
/* Possible flags of a handlerton (there can be 32 of them) */
 
42
enum hton_flag_bits {
 
43
  HTON_BIT_CLOSE_CURSORS_AT_COMMIT,
 
44
  HTON_BIT_ALTER_NOT_SUPPORTED,       // Engine does not support alter
 
45
  HTON_BIT_CAN_RECREATE,              // Delete all is used for truncate
 
46
  HTON_BIT_HIDDEN,                    // Engine does not appear in lists
 
47
  HTON_BIT_FLUSH_AFTER_RENAME,
 
48
  HTON_BIT_NOT_USER_SELECTABLE,
 
49
  HTON_BIT_TEMPORARY_NOT_SUPPORTED,   // Having temporary tables not supported
 
50
  HTON_BIT_SUPPORT_LOG_TABLES,        // Engine supports log tables
 
51
  HTON_BIT_NO_PARTITION,              // You can not partition these tables
 
52
  HTON_BIT_SIZE
 
53
};
 
54
 
 
55
static const std::bitset<HTON_BIT_SIZE> HTON_NO_FLAGS(0);
 
56
static const std::bitset<HTON_BIT_SIZE> HTON_CLOSE_CURSORS_AT_COMMIT(1 <<  HTON_BIT_CLOSE_CURSORS_AT_COMMIT);
 
57
static const std::bitset<HTON_BIT_SIZE> HTON_ALTER_NOT_SUPPORTED(1 << HTON_BIT_ALTER_NOT_SUPPORTED);
 
58
static const std::bitset<HTON_BIT_SIZE> HTON_CAN_RECREATE(1 << HTON_BIT_CAN_RECREATE);
 
59
static const std::bitset<HTON_BIT_SIZE> HTON_HIDDEN(1 << HTON_BIT_HIDDEN);
 
60
static const std::bitset<HTON_BIT_SIZE> HTON_FLUSH_AFTER_RENAME(1 << HTON_BIT_FLUSH_AFTER_RENAME);
 
61
static const std::bitset<HTON_BIT_SIZE> HTON_NOT_USER_SELECTABLE(1 << HTON_BIT_NOT_USER_SELECTABLE);
 
62
static const std::bitset<HTON_BIT_SIZE> HTON_TEMPORARY_NOT_SUPPORTED(1 << HTON_BIT_TEMPORARY_NOT_SUPPORTED);
 
63
static const std::bitset<HTON_BIT_SIZE> HTON_SUPPORT_LOG_TABLES(1 << HTON_BIT_SUPPORT_LOG_TABLES);
 
64
static const std::bitset<HTON_BIT_SIZE> HTON_NO_PARTITION(1 << HTON_BIT_NO_PARTITION);
 
65
 
39
66
#define HA_MAX_ALTER_FLAGS 40
40
67
typedef Bitmap<HA_MAX_ALTER_FLAGS> HA_ALTER_FLAGS;
41
68