Public Types | |
typedef uint64_t | Table_flags |
typedef std::pair< const std::string, const std::string > | map_key |
typedef std::map< const map_key, plugin::Plugin * > | map |
typedef std::vector< Plugin * > | vector |
Public Member Functions | |
SEAPITester (const string &name_arg) | |
const char ** | bas_ext () const |
virtual Cursor * | create (Table &table) |
int | doCreateTable (Session &, Table &, const drizzled::identifier::Table &identifier, const drizzled::message::Table &create_proto) |
int | doDropTable (Session &, const identifier::Table &identifier) |
int | doRenameTable (drizzled::Session &session, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to) |
int | doGetTableDefinition (Session &, const identifier::Table &, drizzled::message::Table &) |
bool | doDoesTableExist (Session &, const identifier::Table &identifier) |
void | doGetTableIdentifiers (drizzled::CachedDirectory &, const drizzled::identifier::Schema &, drizzled::identifier::Table::vector &) |
virtual int | doStartTransaction (Session *session, start_transaction_option_t options) |
virtual void | doStartStatement (Session *session) |
virtual void | doEndStatement (Session *session) |
virtual int | doSetSavepoint (Session *, drizzled::NamedSavepoint &) |
virtual int | doRollbackToSavepoint (Session *, drizzled::NamedSavepoint &) |
virtual int | doReleaseSavepoint (Session *, drizzled::NamedSavepoint &) |
virtual int | doCommit (Session *, bool) |
virtual int | doRollback (Session *, bool) |
uint32_t | max_supported_record_length (void) const |
uint32_t | max_supported_keys (void) const |
uint32_t | max_supported_key_parts (void) const |
uint32_t | max_supported_key_length (void) const |
uint32_t | max_supported_key_part_length (void) const |
uint32_t | index_flags (enum ha_key_alg) const |
virtual int | startTransaction (Session *session, start_transaction_option_t options) |
virtual void | startStatement (Session *session) |
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) |
virtual bool | participatesInSqlTransaction () const |
virtual bool | participatesInXaTransaction () const |
virtual bool | alwaysRegisterForXaTransaction () const |
const std::string & | getTableDefinitionFileExtension () |
const std::vector< std::string > & | getAliases () const |
void | addAlias (std::string alias) |
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 void | endStatement (Session *session) |
virtual int | close_connection (Session *) |
virtual bool | flush_logs () |
virtual bool | show_status (Session *, stat_print_fn *, enum ha_stat_type) |
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 bool | validateCreateTableOption (const std::string &key, const std::string &state) |
virtual bool | validateCreateSchemaOption (const std::string &key, const std::string &state) |
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 |
size_t | getId () const |
Static Public Member Functions | |
static int | notifyStartTransaction (Session *session, start_transaction_option_t options) |
static int | releaseTemporaryLatches (Session *session) |
static bool | addPlugin (plugin::TransactionalStorageEngine *engine) |
static bool | addPlugin (plugin::StorageEngine *engine) |
static void | removePlugin (plugin::TransactionalStorageEngine *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 *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, identifier::Table::const_reference identifier, drizzled::error_t &error) |
static void | getIdentifiers (Session &session, const identifier::Schema &schema_identifier, identifier::Table::vector &set_of_identifiers) |
static void | getIdentifiers (Session &session, identifier::Schema::vector &schemas) |
static bool | canCreateTable (const drizzled::identifier::Table &identifier) |
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 * | getSchemaCollation (const drizzled::identifier::Schema &identifier) |
static bool | createSchema (const drizzled::message::Schema &schema_message) |
static bool | dropSchema (Session &session, identifier::Schema::const_reference 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) |
Protected Types | |
typedef std::map< std::string, message::Table > | ProtoCache |
Used as a protobuf storage currently by TEMP only engines. | |
Protected Member Functions | |
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 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 | |
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 | |
std::string | table_definition_ext |
ProtoCache | proto_cache |
pthread_mutex_t | proto_cache_mutex |
Friends | |
class | AddSchemaNames |
class | AddTableIdentifier |
class | AlterSchema |
class | CanCreateTable |
class | CreateSchema |
class | DropSchema |
class | DropTable |
class | DropTables |
class | FindEngineByName |
class | Ha_delete_table_error_handler |
class | StorageEngineCloseConnection |
class | StorageEngineDoesTableExist |
class | StorageEngineGetSchemaDefinition |
class | StorageEngineGetTableDefinition |
class | DropTableByIdentifier |
Definition at line 464 of file storage_engine_api_tester.cc.
virtual bool drizzled::plugin::TransactionalStorageEngine::alwaysRegisterForXaTransaction | ( | ) | const [inline, virtual, inherited] |
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::StorageEngine.
Reimplemented in drizzled::plugin::XaStorageEngine.
Definition at line 120 of file transactional_storage_engine.h.
const char** drizzled::plugin::SEAPITester::bas_ext | ( | ) | const [inline, virtual] |
If frm_error() is called then we will use this to find out what file extentions exist for the storage engine. This is also used by the default rename_table and delete_table method in Cursor.cc.
For engines that have two file name extentions (separate meta/index file and data file), the order of elements is relevant. First element of engine file name extentions array should be meta/index file extention. Second element - data file extention. This order is assumed by prepare_for_repair() when REPAIR Table ... USE_FRM is issued.
Implements drizzled::plugin::StorageEngine.
Definition at line 488 of file storage_engine_api_tester.cc.
bool drizzled::plugin::StorageEngine::canCreateTable | ( | const drizzled::identifier::Table & | identifier | ) | [static, inherited] |
Definition at line 1173 of file storage_engine.cc.
void drizzled::plugin::StorageEngine::closeConnection | ( | Session * | session | ) | [static, inherited] |
Definition at line 261 of file storage_engine.cc.
bool drizzled::plugin::StorageEngine::createTable | ( | Session & | session, |
const identifier::Table & | identifier, | ||
message::Table & | table_message | ||
) | [static, inherited] |
Initiates table-file and calls appropriate database-creator.
0 | ok |
1 | error |
Definition at line 551 of file storage_engine.cc.
References drizzled::Table::delete_table().
int drizzled::plugin::SEAPITester::doCommit | ( | Session * | session, |
bool | normal_transaction | ||
) | [virtual] |
Commits either the "statement transaction" or the "normal transaction".
[in] | The | Session |
[in] | true | if it's a real commit, that makes persistent changes false if it's not in fact a commit but an end of the statement that is part of the transaction. |
'normal_transaction' is also false in auto-commit mode where 'end of statement' and 'real commit' mean the same event.
Implements drizzled::plugin::TransactionalStorageEngine.
Definition at line 645 of file storage_engine_api_tester.cc.
int drizzled::plugin::SEAPITester::doDropTable | ( | Session & | session, |
const identifier::Table & | identifier | ||
) | [virtual] |
Delete all files with extension from bas_ext().
name | Base name of table |
0 | If we successfully deleted at least one file from base_ext and didn't get any other errors than ENOENT |
!0 | Error |
Implements drizzled::plugin::StorageEngine.
Definition at line 612 of file storage_engine_api_tester.cc.
bool drizzled::plugin::plugin::StorageEngine::doesTableExist | ( | Session & | session, |
const drizzled::identifier::Table & | identifier, | ||
bool | include_temporary_tables = true |
||
) | [static, inherited] |
Utility method which hides some of the details of getTableDefinition()
Definition at line 332 of file storage_engine.cc.
Referenced by drizzled::internal_alter_table().
int drizzled::plugin::SEAPITester::doRollback | ( | Session * | session, |
bool | normal_transaction | ||
) | [virtual] |
Rolls back either the "statement transaction" or the "normal transaction".
[in] | The | Session |
[in] | true | if it's a real commit, that makes persistent changes false if it's not in fact a commit but an end of the statement that is part of the transaction. |
'normal_transaction' is also false in auto-commit mode where 'end of statement' and 'real commit' mean the same event.
Implements drizzled::plugin::TransactionalStorageEngine.
Definition at line 660 of file storage_engine_api_tester.cc.
virtual int drizzled::plugin::SEAPITester::doSetSavepoint | ( | Session * | session, |
drizzled::NamedSavepoint & | savepoint | ||
) | [inline, virtual] |
Implementing classes should override these to provide savepoint functionality.
Implements drizzled::plugin::TransactionalStorageEngine.
Definition at line 528 of file storage_engine_api_tester.cc.
bool drizzled::plugin::StorageEngine::get_error_message | ( | int | error, |
String * | buf | ||
) | const [protected, virtual, inherited] |
Return an error message specific to this Cursor.
error | error code previously returned by Cursor |
buf | pointer to String where to add error message |
Definition at line 1005 of file storage_engine.cc.
Referenced by drizzled::plugin::StorageEngine::print_error().
size_t drizzled::plugin::MonitoredInTransaction::getId | ( | ) | const [inline, inherited] |
Returns the "slot" or ID of the monitored resource
Definition at line 87 of file monitored_in_transaction.h.
int drizzled::plugin::TransactionalStorageEngine::notifyStartTransaction | ( | Session * | session, |
start_transaction_option_t | options | ||
) | [static, inherited] |
The below static class methods wrap the interaction of the vector of transactional storage engines.
Definition at line 106 of file transactional_storage_engine.cc.
virtual bool drizzled::plugin::TransactionalStorageEngine::participatesInSqlTransaction | ( | ) | const [inline, virtual, inherited] |
Returns true if the class should participate in the SQL transaction.
Reimplemented from drizzled::plugin::StorageEngine.
Reimplemented in drizzled::plugin::XaStorageEngine.
Definition at line 112 of file transactional_storage_engine.h.
virtual bool drizzled::plugin::TransactionalStorageEngine::participatesInXaTransaction | ( | ) | const [inline, virtual, inherited] |
Returns true if the class should participate in the XA transaction.
Reimplemented from drizzled::plugin::StorageEngine.
Reimplemented in drizzled::plugin::XaStorageEngine.
Definition at line 116 of file transactional_storage_engine.h.
void drizzled::plugin::StorageEngine::print_error | ( | int | error, |
myf | errflag, | ||
const Table & | table | ||
) | const [virtual, inherited] |
Print error that we got from Cursor function.
Definition at line 801 of file storage_engine.cc.
References drizzled::Table::get_dup_key(), drizzled::plugin::StorageEngine::get_error_message(), and drizzled::Table::key_info.
int drizzled::plugin::TransactionalStorageEngine::releaseTemporaryLatches | ( | Session * | session | ) | [static, inherited] |
This function should be called when MySQL sends rows of a SELECT result set or the EOF mark to the client. It releases a possible adaptive hash index S-latch held by session in InnoDB and also releases a possible InnoDB query FIFO ticket to enter InnoDB. To save CPU time, InnoDB allows a session to keep them over several calls of the InnoDB Cursor interface when a join is executed. But when we let the control to pass to the client they have to be released because if the application program uses use_result(), it may deadlock on the S-latch if the application on another connection performs another SQL query. In MySQL-4.1 this is even more important because there a connection can have several SELECT queries open at the same time.
session | the thread handle of the current connection |
Definition at line 85 of file transactional_storage_engine.cc.
Referenced by drizzled::insert_query(), and drizzled::FileSort::run().