~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.h

  • Committer: Lee Bieber
  • Date: 2011-02-11 20:30:05 UTC
  • mfrom: (2157.1.3 build)
  • Revision ID: kalebral@gmail.com-20110211203005-757o1y2yf78dxzqr
Merge Stewart - 716848: drizzleimport displays wrong program_name
Merge Stewart - update README file
Merge Andrew and Joe - Exposes the InnoDB SYS_REPLICATION_LOG to data_dictionary so that it is fast and fixes many issues we have been having

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define DRIZZLED_PLUGIN_STORAGE_ENGINE_H
22
22
 
23
23
 
24
 
#include <drizzled/cached_directory.h>
25
24
#include <drizzled/definitions.h>
26
 
#include <drizzled/error_t.h>
 
25
#include <drizzled/plugin.h>
27
26
#include <drizzled/handler_structs.h>
28
 
#include <drizzled/identifier.h>
29
27
#include <drizzled/message.h>
30
28
#include <drizzled/message/cache.h>
31
 
#include <drizzled/plugin.h>
32
 
#include <drizzled/plugin/monitored_in_transaction.h>
33
 
#include <drizzled/plugin/plugin.h>
34
 
#include <drizzled/sql_string.h>
 
29
#include "drizzled/plugin/plugin.h"
 
30
#include "drizzled/sql_string.h"
 
31
#include "drizzled/identifier.h"
 
32
#include "drizzled/cached_directory.h"
 
33
#include "drizzled/plugin/monitored_in_transaction.h"
 
34
 
 
35
#include <drizzled/error_t.h>
35
36
 
36
37
#include <bitset>
37
38
#include <string>
38
39
#include <vector>
39
40
#include <set>
40
41
 
41
 
#include <drizzled/visibility.h>
 
42
#include "drizzled/visibility.h"
42
43
 
43
44
namespace drizzled
44
45
{
222
223
  }
223
224
 
224
225
  /* Old style cursor errors */
225
 
  void print_keydup_error(uint32_t key_nr, const char *msg, const Table &table) const;
226
 
  virtual bool get_error_message(int error, String *buf) const;
 
226
  void print_keydup_error(uint32_t key_nr, const char *msg, Table &table);
 
227
  virtual bool get_error_message(int error, String *buf);
227
228
 
228
229
public:
229
 
  virtual void print_error(int error, myf errflag, const Table& table) const;
 
230
  virtual void print_error(int error, myf errflag, Table& table);
230
231
 
231
232
  bool is_user_selectable() const
232
233
  {
323
324
  static bool addPlugin(plugin::StorageEngine *engine);
324
325
  static void removePlugin(plugin::StorageEngine *engine);
325
326
 
 
327
  static int getTableDefinition(Session& session,
 
328
                                const drizzled::identifier::Table &identifier,
 
329
                                message::table::shared_ptr &table_proto,
 
330
                                bool include_temporary_tables= true);
326
331
  static message::table::shared_ptr getTableMessage(Session& session,
327
332
                                                    const drizzled::identifier::Table &identifier,
 
333
                                                    drizzled::error_t &error,
328
334
                                                    bool include_temporary_tables= true);
329
335
  static bool doesTableExist(Session &session,
330
336
                             const drizzled::identifier::Table &identifier,
357
363
 
358
364
  // @note All schema methods defined here
359
365
  static void getIdentifiers(Session &session, identifier::Schema::vector &schemas);
360
 
  static message::schema::shared_ptr getSchemaDefinition(const drizzled::identifier::Table &identifier);
361
 
  static message::schema::shared_ptr getSchemaDefinition(const drizzled::identifier::Schema &identifier);
 
366
  static bool getSchemaDefinition(const drizzled::identifier::Table &identifier, message::schema::shared_ptr &proto);
 
367
  static bool getSchemaDefinition(const drizzled::identifier::Schema &identifier, message::schema::shared_ptr &proto);
362
368
  static bool doesSchemaExist(const drizzled::identifier::Schema &identifier);
363
369
  static const CHARSET_INFO *getSchemaCollation(const drizzled::identifier::Schema &identifier);
364
370
  static bool createSchema(const drizzled::message::Schema &schema_message);
365
 
  static bool dropSchema(Session &session,
366
 
                         identifier::Schema::const_reference identifier,
367
 
                         message::schema::const_reference schema_message);
 
371
  static bool dropSchema(drizzled::Session& session, identifier::Schema::const_reference identifier);
368
372
  static bool alterSchema(const drizzled::message::Schema &schema_message);
369
373
 
370
374
  // @note make private/protected
372
376
  virtual void doGetSchemaIdentifiers(identifier::Schema::vector&)
373
377
  { }
374
378
 
375
 
  virtual drizzled::message::schema::shared_ptr doGetSchemaDefinition(const drizzled::identifier::Schema&)
 
379
  virtual bool doGetSchemaDefinition(const drizzled::identifier::Schema&, drizzled::message::schema::shared_ptr&)
376
380
  { 
377
 
    return drizzled::message::schema::shared_ptr(); 
 
381
    return false; 
378
382
  }
379
383
 
380
384
  virtual bool doCreateSchema(const drizzled::message::Schema&)
401
405
  Cursor *getCursor(Table &share);
402
406
 
403
407
  uint32_t max_record_length() const
404
 
  { return std::min(HA_MAX_REC_LENGTH, max_supported_record_length()); }
 
408
  { return std::min((unsigned int)HA_MAX_REC_LENGTH, max_supported_record_length()); }
405
409
  uint32_t max_keys() const
406
 
  { return std::min(MAX_KEY, max_supported_keys()); }
 
410
  { return std::min((unsigned int)MAX_KEY, max_supported_keys()); }
407
411
  uint32_t max_key_parts() const
408
 
  { return std::min(MAX_REF_PARTS, max_supported_key_parts()); }
 
412
  { return std::min((unsigned int)MAX_REF_PARTS, max_supported_key_parts()); }
409
413
  uint32_t max_key_length() const
410
 
  { return std::min(MAX_KEY_LENGTH, max_supported_key_length()); }
 
414
  { return std::min((unsigned int)MAX_KEY_LENGTH, max_supported_key_length()); }
411
415
  uint32_t max_key_part_length(void) const
412
 
  { return std::min(MAX_KEY_LENGTH, max_supported_key_part_length()); }
 
416
  { return std::min((unsigned int)MAX_KEY_LENGTH, max_supported_key_part_length()); }
413
417
 
414
418
  virtual uint32_t max_supported_record_length(void) const
415
419
  { return HA_MAX_REC_LENGTH; }