|
drizzle
C++ MySQL-protocol-compatible database server
|
#include <xa_storage_engine.h>
Public Member Functions | |
| XaStorageEngine (const std::string &name_arg, const std::bitset< HTON_BIT_SIZE > &flags_arg=HTON_NO_FLAGS) | |
| int | startTransaction (Session *session, start_transaction_option_t options) |
| void | startStatement (Session *session) |
| bool | participatesInSqlTransaction () const |
| bool | participatesInXaTransaction () const |
| bool | alwaysRegisterForXaTransaction () const |
| Public Member Functions inherited from drizzled::plugin::TransactionalStorageEngine | |
| TransactionalStorageEngine (const std::string &name_arg, const std::bitset< HTON_BIT_SIZE > &flags_arg=HTON_NO_FLAGS) | |
| virtual int | commit (Session *session, bool normal_transaction) |
| virtual int | rollback (Session *session, bool normal_transaction) |
| int | setSavepoint (Session *session, NamedSavepoint &sp) |
| int | rollbackToSavepoint (Session *session, NamedSavepoint &sp) |
| int | releaseSavepoint (Session *session, NamedSavepoint &sp) |
| Public Member Functions inherited from drizzled::plugin::StorageEngine | |
| const std::string & | getTableDefinitionFileExtension () |
| virtual message::Table::Index::IndexType | default_index_type () const |
| const std::vector< std::string > & | getAliases () const |
| void | addAlias (std::string alias) |
| StorageEngine (const std::string &name_arg, const std::bitset< HTON_BIT_SIZE > &flags_arg=HTON_NO_FLAGS) | |
| virtual void | print_error (int error, myf errflag, const Table &table) const |
| bool | is_user_selectable () const |
| bool | check_flag (const engine_flag_bits flag) const |
| virtual uint32_t | index_flags (drizzled::message::Table::Index::IndexType) const |
| virtual void | endStatement (Session *session) |
| virtual int | close_connection (Session *) |
| virtual Cursor * | create (Table &)=0 |
| virtual bool | flush_logs () |
| virtual bool | show_status (Session *, stat_print_fn *, enum ha_stat_type) |
| virtual const char ** | bas_ext () const =0 |
| int | renameTable (Session &session, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to) |
| Cursor * | getCursor (Table &share) |
| uint32_t | max_record_length () const |
| uint32_t | max_keys () const |
| uint32_t | max_key_parts () const |
| uint32_t | max_key_length () const |
| uint32_t | max_key_part_length (void) const |
| virtual uint32_t | max_supported_record_length (void) const |
| virtual uint32_t | max_supported_keys (void) const |
| virtual uint32_t | max_supported_key_parts (void) const |
| virtual uint32_t | max_supported_key_length (void) const |
| virtual uint32_t | max_supported_key_part_length (void) const |
| virtual bool | validateCreateTableOption (const std::string &key, const std::string &state) |
| virtual bool | validateCreateSchemaOption (const std::string &key, const std::string &state) |
| Public Member Functions inherited from drizzled::plugin::Plugin | |
| Plugin (const std::string &name, const std::string &type_name) | |
| virtual void | shutdownPlugin () |
| virtual void | prime () |
| virtual void | startup (drizzled::Session &) |
| void | activate () |
| void | deactivate () |
| bool | isActive () const |
| const std::string & | getName () const |
| void | setModule (module::Module *module) |
| const std::string & | getTypeName () const |
| virtual bool | removeLast () const |
| const std::string & | getModuleName () const |
| Public Member Functions inherited from drizzled::plugin::MonitoredInTransaction | |
| size_t | getId () const |
| Public Member Functions inherited from drizzled::plugin::XaResourceManager | |
| int | xaPrepare (Session *session, bool normal_transaction) |
| int | xaCommit (Session *session, bool normal_transaction) |
| int | xaRollback (Session *session, bool normal_transaction) |
| int | xaCommitXid (XID *xid) |
| int | xaRollbackXid (XID *xid) |
| int | xaRecover (XID *append_to, size_t len) |
| uint64_t | getCurrentTransactionId (Session *session) |
| uint64_t | getNewTransactionId (Session *session) |
Static Public Member Functions | |
| static bool | addPlugin (plugin::XaStorageEngine &engine) |
| static void | removePlugin (plugin::XaStorageEngine &engine) |
| Static Public Member Functions inherited from drizzled::plugin::TransactionalStorageEngine | |
| static int | notifyStartTransaction (Session *session, start_transaction_option_t options) |
| static void | releaseTemporaryLatches (Session *session) |
| static bool | addPlugin (plugin::TransactionalStorageEngine &engine) |
| static void | removePlugin (plugin::TransactionalStorageEngine &engine) |
| Static Public Member Functions inherited from drizzled::plugin::StorageEngine | |
| static bool | addPlugin (plugin::StorageEngine &engine) |
| static void | removePlugin (plugin::StorageEngine &engine) |
| static message::table::shared_ptr | getTableMessage (Session &session, const drizzled::identifier::Table &identifier, bool include_temporary_tables=true) |
| static bool | doesTableExist (Session &session, const drizzled::identifier::Table &identifier, bool include_temporary_tables=true) |
| static plugin::StorageEngine * | findByName (const std::string &find_str) |
| static plugin::StorageEngine * | findByName (Session &session, const std::string &find_str) |
| static void | closeConnection (Session &) |
| static void | dropDatabase (char *path) |
| static bool | flushLogs (plugin::StorageEngine *db_type) |
| static bool | dropTable (Session &session, const drizzled::identifier::Table &identifier) |
| static bool | dropTable (Session &session, const drizzled::identifier::Table &identifier, drizzled::error_t &error) |
| static bool | dropTable (Session &session, StorageEngine &engine, const identifier::Table &identifier, drizzled::error_t &error) |
| static void | getIdentifiers (Session &session, const identifier::Schema &schema_identifier, identifier::table::vector &set_of_identifiers) |
| static bool | canCreateTable (const drizzled::identifier::Table &identifier) |
| static void | getIdentifiers (Session &session, identifier::schema::vector &schemas) |
| static message::schema::shared_ptr | getSchemaDefinition (const drizzled::identifier::Table &identifier) |
| static message::schema::shared_ptr | getSchemaDefinition (const drizzled::identifier::Schema &identifier) |
| static bool | doesSchemaExist (const drizzled::identifier::Schema &identifier) |
| static const charset_info_st * | getSchemaCollation (const drizzled::identifier::Schema &identifier) |
| static bool | createSchema (const drizzled::message::Schema &schema_message) |
| static bool | dropSchema (Session &session, const identifier::Schema &identifier, message::schema::const_reference schema_message) |
| static bool | alterSchema (const drizzled::message::Schema &schema_message) |
| static const std::string & | resolveName (const StorageEngine *engine) |
| static bool | createTable (Session &session, const identifier::Table &identifier, message::Table &table_message) |
| static void | removeLostTemporaryTables (Session &session, const char *directory) |
| Static Public Member Functions inherited from drizzled::plugin::XaResourceManager | |
| static int | commitOrRollbackXID (XID *xid, bool commit) |
| static int | recoverAllXids () |
| static int | recoverAllXids (const commit_list_set &commit_list) |
| static bool | addPlugin (plugin::XaResourceManager &manager) |
| static void | removePlugin (plugin::XaResourceManager &manager) |
Private Member Functions | |
| virtual int | doStartTransaction (Session *session, start_transaction_option_t options) |
| virtual void | doStartStatement (Session *session) |
Additional Inherited Members | |
| Public Types inherited from drizzled::plugin::StorageEngine | |
| typedef uint64_t | Table_flags |
| Public Types inherited from drizzled::plugin::Plugin | |
| typedef std::pair< const std::string, const std::string > | map_key |
| typedef std::unique_ptr< plugin::Plugin, deleter_fn > | owned_ptr |
| typedef std::map< const map_key, owned_ptr > | map |
| typedef std::vector< Plugin * > | vector |
| Public Types inherited from drizzled::plugin::XaResourceManager | |
| typedef ::std::unordered_set< my_xid > | commit_list_set |
| Protected Types inherited from drizzled::plugin::StorageEngine | |
| typedef std::map< std::string, message::Table > | ProtoCache |
| Used as a protobuf storage currently by TEMP only engines. | |
| Protected Member Functions inherited from drizzled::plugin::StorageEngine | |
| virtual int | doGetTableDefinition (Session &session, const drizzled::identifier::Table &identifier, message::Table &table_message) |
| void | print_keydup_error (uint32_t key_nr, const char *msg, const Table &table) const |
| virtual bool | get_error_message (int error, String *buf) const |
| virtual int | doCreateTable (Session &session, Table &table_arg, const drizzled::identifier::Table &identifier, const message::Table &message)=0 |
| virtual int | doRenameTable (Session &session, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to)=0 |
| virtual int | doDropTable (Session &session, const drizzled::identifier::Table &identifier)=0 |
| virtual void | doGetTableIdentifiers (CachedDirectory &directory, const drizzled::identifier::Schema &schema_identifier, identifier::table::vector &set_of_identifiers)=0 |
| virtual bool | doDoesTableExist (Session &session, const drizzled::identifier::Table &identifier) |
| virtual bool | doCanCreateTable (const drizzled::identifier::Table &identifier) |
| virtual void | doGetSchemaIdentifiers (identifier::schema::vector &) |
| virtual drizzled::message::schema::shared_ptr | doGetSchemaDefinition (const drizzled::identifier::Schema &) |
| virtual bool | doCreateSchema (const drizzled::message::Schema &) |
| virtual bool | doAlterSchema (const drizzled::message::Schema &) |
| virtual bool | doDropSchema (const drizzled::identifier::Schema &) |
| Static Protected Member Functions inherited from drizzled::plugin::StorageEngine | |
| static int | deleteDefinitionFromPath (const drizzled::identifier::Table &identifier) |
| static int | renameDefinitionFromPath (const drizzled::identifier::Table &dest, const drizzled::identifier::Table &src) |
| static int | writeDefinitionFromPath (const drizzled::identifier::Table &identifier, const message::Table &proto) |
| static bool | readTableFile (const std::string &path, message::Table &table_message) |
| Protected Attributes inherited from drizzled::plugin::StorageEngine | |
| std::string | table_definition_ext |
| ProtoCache | proto_cache |
| pthread_mutex_t | proto_cache_mutex |
A type of storage engine which supports distributed transactions in the XA protocol.
The real XA resource manager interface is in the plugin::XaResourceManager class. We would extend XaResourceManager from plugin::Plugin but unfortunately that would lead to member name ambiguity (because plugin::Plugin has member data). So, in this case, TransactionalStorageEngine inherits from plugin::Plugin and XaResourceManager is a pure virtual abstract base class with the X/Open XA distributed transaction protocol interface for resource managers.
Definition at line 43 of file xa_storage_engine.h.
| drizzled::plugin::XaStorageEngine::XaStorageEngine | ( | const std::string & | name_arg, |
| const std::bitset< HTON_BIT_SIZE > & | flags_arg = HTON_NO_FLAGS ) |
Definition at line 45 of file xa_storage_engine.cc.
|
virtual |
Definition at line 50 of file xa_storage_engine.cc.
|
static |
Definition at line 53 of file xa_storage_engine.cc.
|
inlinevirtual |
Returns true if the class should be registered for every XA transaction regardless of whether the class modifies the server's state.
As an example, the XaTransactionApplier plugin class returns true for this virtual method. Even though it does not change the result of the transaction (it simply is logging the changes made by other resource managers), the applier plugin should be enlisted in all XA transactions in order to be able to rollback or recover its logging activity properly.
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 77 of file xa_storage_engine.h.
|
inlineprivatevirtual |
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 115 of file xa_storage_engine.h.
|
inlineprivatevirtual |
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 104 of file xa_storage_engine.h.
|
inlinevirtual |
Returns true if the class should participate in the SQL transaction.
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 69 of file xa_storage_engine.h.
|
inlinevirtual |
Returns true if the class should participate in the XA transaction.
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 73 of file xa_storage_engine.h.
|
static |
Definition at line 61 of file xa_storage_engine.cc.
|
inlinevirtual |
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 59 of file xa_storage_engine.h.
|
inlinevirtual |
Reimplemented from drizzled::plugin::TransactionalStorageEngine.
Definition at line 53 of file xa_storage_engine.h.