~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.h

  • Committer: Eric Day
  • Date: 2010-03-25 19:28:37 UTC
  • mfrom: (1405 staging)
  • mto: This revision was merged to the branch mainline in revision 1409.
  • Revision ID: eday@oddments.org-20100325192837-4exmacbrywjovsqp
Merged trunk, rsolved conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
  HTON_BIT_HAS_CHECKSUM,
84
84
  HTON_BIT_SKIP_STORE_LOCK,
85
85
  HTON_BIT_SCHEMA_DICTIONARY,
 
86
  HTON_BIT_FOREIGN_KEYS,
86
87
  HTON_BIT_SIZE
87
88
};
88
89
 
115
116
static const std::bitset<HTON_BIT_SIZE> HTON_HAS_CHECKSUM(1 << HTON_BIT_HAS_CHECKSUM);
116
117
static const std::bitset<HTON_BIT_SIZE> HTON_SKIP_STORE_LOCK(1 << HTON_BIT_SKIP_STORE_LOCK);
117
118
static const std::bitset<HTON_BIT_SIZE> HTON_HAS_SCHEMA_DICTIONARY(1 << HTON_BIT_SCHEMA_DICTIONARY);
 
119
static const std::bitset<HTON_BIT_SIZE> HTON_HAS_FOREIGN_KEYS(1 << HTON_BIT_FOREIGN_KEYS);
118
120
 
119
121
 
120
122
class Table;
285
287
                            TableIdentifier &identifier,
286
288
                            message::Table& proto)= 0;
287
289
 
288
 
  virtual int doRenameTable(Session* session,
289
 
                            const char *from, const char *to);
 
290
  virtual int doRenameTable(Session &session,
 
291
                            TableIdentifier &from, TableIdentifier &to)= 0;
290
292
 
291
293
public:
292
294
 
293
 
  int renameTable(Session *session, const char *from, const char *to) 
294
 
  {
295
 
    setTransactionReadWrite(*session);
296
 
 
297
 
    return doRenameTable(session, from, to);
298
 
  }
 
295
  int renameTable(Session &session, TableIdentifier &from, TableIdentifier &to);
299
296
 
300
297
  // @todo move these to protected
301
298
  virtual void doGetTableNames(CachedDirectory &directory,
302
299
                               std::string& db_name,
303
300
                               TableNameList &set_of_names);
304
 
  int doDropTable(Session &session,
305
 
                  TableIdentifier &identifier,
306
 
                  const std::string &table_path)
307
 
  {
308
 
    assert(not table_path.compare(identifier.getPath()));
309
 
    return doDropTable(session, identifier);
310
 
  }
311
301
 
312
302
  virtual int doDropTable(Session &session,
313
303
                          TableIdentifier &identifier)= 0;
326
316
 
327
317
  virtual bool doDoesTableExist(Session& session, TableIdentifier &identifier);
328
318
 
329
 
  static plugin::StorageEngine *findByName(std::string find_str);
330
 
  static plugin::StorageEngine *findByName(Session& session,
331
 
                                           std::string find_str);
 
319
  static plugin::StorageEngine *findByName(const std::string &find_str);
 
320
  static plugin::StorageEngine *findByName(Session& session, const std::string &find_str);
 
321
 
332
322
  static void closeConnection(Session* session);
333
323
  static void dropDatabase(char* path);
334
324
  static bool flushLogs(plugin::StorageEngine *db_type);
404
394
  virtual uint32_t max_supported_key_part_length(void) const { return 255; }
405
395
 
406
396
  /* TODO-> Make private */
407
 
  static int readDefinitionFromPath(TableIdentifier &identifier, message::Table &proto);
408
397
  static int deleteDefinitionFromPath(TableIdentifier &identifier);
409
398
  static int renameDefinitionFromPath(TableIdentifier &dest, TableIdentifier &src);
410
399
  static int writeDefinitionFromPath(TableIdentifier &identifier, message::Table &proto);