~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.h

  • Committer: Brian Aker
  • Date: 2009-11-18 06:11:12 UTC
  • mfrom: (1220.1.10 staging)
  • Revision ID: brian@gaz-20091118061112-tyf4qrfr5v7i946b
Monty + Brian Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
enum engine_flag_bits {
50
50
  HTON_BIT_ALTER_NOT_SUPPORTED,       // Engine does not support alter
51
51
  HTON_BIT_HIDDEN,                    // Engine does not appear in lists
52
 
  HTON_BIT_FLUSH_AFTER_RENAME,
53
52
  HTON_BIT_NOT_USER_SELECTABLE,
54
53
  HTON_BIT_TEMPORARY_NOT_SUPPORTED,   // Having temporary tables not supported
55
54
  HTON_BIT_TEMPORARY_ONLY,
62
61
static const std::bitset<HTON_BIT_SIZE> HTON_NO_FLAGS(0);
63
62
static const std::bitset<HTON_BIT_SIZE> HTON_ALTER_NOT_SUPPORTED(1 << HTON_BIT_ALTER_NOT_SUPPORTED);
64
63
static const std::bitset<HTON_BIT_SIZE> HTON_HIDDEN(1 << HTON_BIT_HIDDEN);
65
 
static const std::bitset<HTON_BIT_SIZE> HTON_FLUSH_AFTER_RENAME(1 << HTON_BIT_FLUSH_AFTER_RENAME);
66
64
static const std::bitset<HTON_BIT_SIZE> HTON_NOT_USER_SELECTABLE(1 << HTON_BIT_NOT_USER_SELECTABLE);
67
65
static const std::bitset<HTON_BIT_SIZE> HTON_TEMPORARY_NOT_SUPPORTED(1 << HTON_BIT_TEMPORARY_NOT_SUPPORTED);
68
66
static const std::bitset<HTON_BIT_SIZE> HTON_TEMPORARY_ONLY(1 << HTON_BIT_TEMPORARY_ONLY);
94
92
*/
95
93
class StorageEngine : public Plugin
96
94
{
 
95
public:
 
96
  typedef uint64_t Table_flags;
 
97
 
 
98
private:
 
99
 
97
100
  /*
98
101
    Name used for storage engine.
99
102
  */
170
173
    return ENOENT;
171
174
  }
172
175
 
 
176
  /* Old style cursor errors */
 
177
protected:
 
178
  void print_keydup_error(uint32_t key_nr, const char *msg, Table &table);
 
179
  void print_error(int error, myf errflag, Table *table= NULL);
 
180
  virtual bool get_error_message(int error, String *buf);
 
181
public:
 
182
  virtual void print_error(int error, myf errflag, Table& table);
 
183
 
173
184
  /*
174
185
    each storage engine has it's own memory area (actually a pointer)
175
186
    in the session, for storing per-connection information.
181
192
  */
182
193
  uint32_t slot;
183
194
 
 
195
  virtual Table_flags table_flags(void) const= 0;
 
196
 
184
197
  inline uint32_t getSlot (void) { return slot; }
185
198
  inline void setSlot (uint32_t value) { slot= value; }
186
199