~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.h

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <vector>
36
36
#include <set>
37
37
 
 
38
namespace drizzled
 
39
{
 
40
 
38
41
class TableList;
39
42
class Session;
40
43
class XID;
110
113
 
111
114
 
112
115
class Table;
113
 
 
114
 
namespace drizzled
115
 
{
116
116
class NamedSavepoint;
 
117
 
117
118
namespace plugin
118
119
{
119
120
 
177
178
    @brief
178
179
    Used as a protobuf storage currently by TEMP only engines.
179
180
  */
180
 
  typedef std::map <std::string, drizzled::message::Table> ProtoCache;
 
181
  typedef std::map <std::string, message::Table> ProtoCache;
181
182
  ProtoCache proto_cache;
182
183
  pthread_mutex_t proto_cache_mutex;
183
184
 
204
205
                                   const char *db,
205
206
                                   const char *table_name,
206
207
                                   const bool is_tmp,
207
 
                                   drizzled::message::Table *table_proto)
 
208
                                   message::Table *table_proto)
208
209
  {
209
210
    (void)session;
210
211
    (void)path;
323
324
  virtual int  recover(XID *, uint32_t) { return 0; }
324
325
  virtual int  commit_by_xid(XID *) { return 0; }
325
326
  virtual int  rollback_by_xid(XID *) { return 0; }
326
 
  virtual Cursor *create(TableShare &, drizzled::memory::Root *)= 0;
 
327
  virtual Cursor *create(TableShare &, memory::Root *)= 0;
327
328
  /* args: path */
328
329
  virtual void drop_database(char*) { }
329
330
  virtual int start_consistent_snapshot(Session *) { return 0; }
352
353
  virtual int doCreateTable(Session *session,
353
354
                            const char *table_name,
354
355
                            Table& table_arg,
355
 
                            drizzled::message::Table& proto)= 0;
 
356
                            message::Table& proto)= 0;
356
357
 
357
358
  virtual int doRenameTable(Session* session,
358
359
                            const char *from, const char *to);
368
369
  }
369
370
 
370
371
  // TODO: move these to protected
371
 
  virtual void doGetTableNames(drizzled::CachedDirectory &directory,
 
372
  virtual void doGetTableNames(CachedDirectory &directory,
372
373
                               std::string& db_name,
373
374
                               std::set<std::string>& set_of_names);
374
375
  virtual int doDropTable(Session& session,
401
402
  static int recover(HASH *commit_list);
402
403
  static int startConsistentSnapshot(Session *session);
403
404
  static int dropTable(Session& session,
404
 
                       drizzled::TableIdentifier &identifier,
 
405
                       TableIdentifier &identifier,
405
406
                       bool generate_warning);
406
407
  static void getTableNames(std::string& db_name, std::set<std::string> &set_of_names);
407
408
 
411
412
  }
412
413
 
413
414
  static int createTable(Session& session,
414
 
                         drizzled::TableIdentifier &identifier,
 
415
                         TableIdentifier &identifier,
415
416
                         bool update_create_info,
416
 
                         drizzled::message::Table& table_proto,
 
417
                         message::Table& table_proto,
417
418
                         bool used= true);
418
419
 
419
420
  static void removeLostTemporaryTables(Session &session, const char *directory);
420
421
 
421
 
  Cursor *getCursor(TableShare &share, drizzled::memory::Root *alloc);
 
422
  Cursor *getCursor(TableShare &share, memory::Root *alloc);
422
423
 
423
424
  uint32_t max_record_length() const
424
425
  { return std::min((unsigned int)HA_MAX_REC_LENGTH, max_supported_record_length()); }