Public Member Functions | |
InnobaseEngine (string name_arg) | |
virtual int | close_connection (Session *session) |
virtual int | doSetSavepoint (Session *session, drizzled::NamedSavepoint &savepoint) |
virtual int | doRollbackToSavepoint (Session *session, drizzled::NamedSavepoint &savepoint) |
virtual int | doReleaseSavepoint (Session *session, drizzled::NamedSavepoint &savepoint) |
virtual int | doXaCommit (Session *session, bool all) |
virtual int | doXaRollback (Session *session, bool all) |
virtual uint64_t | doGetCurrentTransactionId (Session *session) |
virtual uint64_t | doGetNewTransactionId (Session *session) |
virtual int | doCommit (Session *session, bool all) |
virtual int | doRollback (Session *session, bool all) |
virtual int | doXaPrepare (Session *session, bool all) |
virtual int | doXaRecover (::drizzled::XID *xid_list, size_t len) |
virtual int | doXaCommitXid (::drizzled::XID *xid) |
virtual int | doXaRollbackXid (::drizzled::XID *xid) |
virtual Cursor * | create (Table &table) |
bool | doDropSchema (const identifier::Schema &identifier) |
virtual bool | flush_logs () |
virtual bool | show_status (Session *session, stat_print_fn *stat_print, enum ha_stat_type stat_type) |
virtual int | doReleaseTemporaryLatches (Session *session) |
const char ** | bas_ext () const |
UNIV_INTERN int | doCreateTable (Session &session, Table &form, const identifier::Table &identifier, const message::Table &) |
UNIV_INTERN int | doRenameTable (Session &, const identifier::Table &from, const identifier::Table &to) |
UNIV_INTERN int | doDropTable (Session &session, const identifier::Table &identifier) |
virtual UNIV_INTERN bool | get_error_message (int error, String *buf) const |
UNIV_INTERN uint32_t | max_supported_keys () const |
UNIV_INTERN uint32_t | max_supported_key_length () const |
UNIV_INTERN uint32_t | max_supported_key_part_length () const |
UNIV_INTERN uint32_t | index_flags (enum ha_key_alg) const |
int | doGetTableDefinition (drizzled::Session &session, const identifier::Table &identifier, drizzled::message::Table &table_proto) |
bool | doDoesTableExist (drizzled::Session &session, const identifier::Table &identifier) |
void | doGetTableIdentifiers (drizzled::CachedDirectory &directory, const drizzled::identifier::Schema &schema_identifier, drizzled::identifier::table::vector &set_of_identifiers) |
bool | validateCreateTableOption (const std::string &key, const std::string &state) |
void | dropTemporarySchema () |
Private Member Functions | |
virtual int | doStartTransaction (Session *session, start_transaction_option_t options) |
virtual void | doStartStatement (Session *session) |
virtual void | doEndStatement (Session *session) |
Definition at line 388 of file ha_innodb.cc.
|
virtual |
Frees a possible InnoDB trx object associated with the current Session.
session | in: handle to the MySQL thread of the user whose resources should be free'd |
Definition at line 3079 of file ha_innodb.cc.
References trx_struct::conc_state, innobase_rollback_trx(), session_to_trx(), trx_free_for_mysql(), trx_struct::undo_no, and ut_a.
|
virtual |
Commits a transaction in an InnoDB database or marks an SQL statement ended.
session | in: MySQL thread handle of the user for whom the transaction should be committed |
all | in: TRUE - commit transaction FALSE - the current SQL statement ended |
Definition at line 2797 of file ha_innodb.cc.
References check_trx_exists(), commit_threads, trx_struct::conc_state, innobase_commit_low(), trx_struct::n_autoinc_rows, read_view_close_for_mysql(), row_unlock_table_autoinc_for_mysql(), srv_active_wake_master_thread(), srv_conc_force_exit_innodb(), trx_commit_complete_for_mysql(), trx_mark_sql_stat_end(), and trx_search_latch_release_if_reserved().
UNIV_INTERN int InnobaseEngine::doCreateTable | ( | Session & | session, |
Table & | form, | ||
const identifier::Table & | identifier, | ||
const message::Table & | create_proto | ||
) |
Validates the create options. We may build on this function in future. For now, it checks two specifiers: KEY_BLOCK_SIZE and ROW_FORMAT If innodb_strict_mode is not set then this function is a no-op
session | in: Session |
form | in: information on table columns and indexes |
Definition at line 6320 of file ha_innodb.cc.
References check_trx_exists(), convert_error_code_to_mysql(), create_clustered_index_when_no_primary(), create_index(), create_table_def(), dict_table_autoinc_initialize(), dict_table_autoinc_lock(), dict_table_autoinc_unlock(), dict_table_get(), dict_table_get_format(), DICT_TF2_SHIFT, DICT_TF2_TEMPORARY, DICT_TF_COMPACT, DICT_TF_FORMAT_SHIFT, DICT_TF_FORMAT_ZIP, DICT_TF_ZSSIZE_SHIFT, trx_struct::id, innobase_commit_low(), innobase_trx_allocate(), drizzled::Table::key_info, log_buffer_flush_to_disk(), row_mysql_unlock_data_dictionary(), row_table_add_foreign_constraints(), srv_active_wake_master_thread(), srv_file_format, srv_file_per_table, trx_free_for_mysql(), trx_search_latch_release_if_reserved(), and trx_sys_file_format_max_upgrade().
bool InnobaseEngine::doDropSchema | ( | const identifier::Schema & | identifier | ) |
Removes all tables in the named database inside InnoDB.
identifier | in: database path; inside InnoDB the name of the last directory in the path is used as the database name: for example, in 'mysql/data/test' the database name is 'test' |
Definition at line 6827 of file ha_innodb.cc.
References check_trx_exists(), innobase_commit_low(), innobase_trx_allocate(), log_buffer_flush_to_disk(), row_drop_database_for_mysql(), srv_active_wake_master_thread(), trx_free_for_mysql(), and trx_search_latch_release_if_reserved().
UNIV_INTERN int InnobaseEngine::doDropTable | ( | Session & | session, |
const identifier::Table & | identifier | ||
) |
Drops a table from an InnoDB database. Before calling this function, MySQL calls innobase_commit to commit the transaction of the current user. Then the current user cannot have locks set on the table. Drop table operation inside InnoDB will remove all locks any user has on the table inside InnoDB.
Definition at line 6722 of file ha_innodb.cc.
References check_trx_exists(), convert_error_code_to_mysql(), trx_struct::id, innobase_commit_low(), innobase_trx_allocate(), log_buffer_flush_to_disk(), row_drop_table_for_mysql(), srv_active_wake_master_thread(), trx_free_for_mysql(), trx_search_latch_release_if_reserved(), and ut_a.
|
virtual |
Release transaction savepoint name.
session | in: handle to the MySQL thread of the user whose transaction should be rolled back |
named_savepoint | in: savepoint data |
Definition at line 3021 of file ha_innodb.cc.
References check_trx_exists(), convert_error_code_to_mysql(), and trx_release_savepoint_for_mysql().
|
virtual |
Call this function when mysqld passes control to the client. That is to avoid deadlocks on the adaptive hash S-latch possibly held by session. For more documentation, see Cursor.cc.
session | in: MySQL thread |
Definition at line 1075 of file ha_innodb.cc.
References innobase_release_stat_resources(), and session_to_trx().
UNIV_INTERN int InnobaseEngine::doRenameTable | ( | Session & | session, |
const identifier::Table & | from, | ||
const identifier::Table & | to | ||
) |
Renames an InnoDB table.
Definition at line 6960 of file ha_innodb.cc.
References check_trx_exists(), convert_error_code_to_mysql(), trx_struct::id, innobase_commit_low(), innobase_rename_table(), innobase_trx_allocate(), srv_active_wake_master_thread(), trx_free_for_mysql(), and trx_search_latch_release_if_reserved().
|
virtual |
Rolls back a transaction or the latest SQL statement.
session | in: handle to the MySQL thread of the user whose transaction should be rolled back |
all | in: TRUE - commit transaction FALSE - the current SQL statement ended |
Definition at line 2912 of file ha_innodb.cc.
References check_trx_exists(), convert_error_code_to_mysql(), innobase_release_stat_resources(), trx_struct::n_autoinc_rows, read_view_close_for_mysql(), row_unlock_table_autoinc_for_mysql(), trx_rollback_for_mysql(), and trx_rollback_last_sql_stat_for_mysql().
|
virtual |
Rolls back a transaction to a savepoint.
session | in: handle to the MySQL thread of the user whose transaction should be rolled back |
named_savepoint | in: savepoint data |
Definition at line 2991 of file ha_innodb.cc.
References check_trx_exists(), convert_error_code_to_mysql(), innobase_release_stat_resources(), and trx_rollback_to_savepoint_for_mysql().
|
virtual |
Sets a transaction savepoint.
session | in: handle to the MySQL thread |
named_savepoint | in: savepoint data |
Definition at line 3043 of file ha_innodb.cc.
References check_trx_exists(), trx_struct::conc_state, convert_error_code_to_mysql(), innobase_release_stat_resources(), and trx_savepoint_for_mysql().
|
privatevirtual |
We will also use this function to communicate to InnoDB that a new SQL statement has started and that we must store a savepoint to our transaction handle, so that we are able to roll back the SQL statement in case of an error.
session | in: handle to the Drizzle session |
Definition at line 9177 of file ha_innodb.cc.
References check_trx_exists(), trx_struct::detailed_error, and innobase_map_isolation_level().
|
privatevirtual |
Creates an InnoDB transaction struct for the thd if it does not yet have one. Starts a new InnoDB transaction if a transaction is not yet started. And assigns a new snapshot for a consistent read if the transaction does not yet have one.
session | in: MySQL thread handle of the user for whom the transaction should be committed |
Definition at line 2766 of file ha_innodb.cc.
References check_trx_exists(), innobase_release_stat_resources(), trx_assign_read_view(), and trx_start_if_not_started().
|
virtual |
This function is used to commit one X/Open XA distributed transaction which is in the prepared state
xid | in: X/Open XA transaction identification |
Definition at line 9324 of file ha_innodb.cc.
References innobase_commit_low(), and trx_get_trx_by_xid().
|
virtual |
This function is used to prepare an X/Open XA distributed transaction.
session | in: handle to the MySQL thread of the user whose XA transaction should be prepared |
all | in: TRUE - commit transaction FALSE - the current SQL statement ended |
Definition at line 9211 of file ha_innodb.cc.
References check_trx_exists(), trx_struct::conc_state, innobase_release_stat_resources(), row_unlock_table_autoinc_for_mysql(), srv_active_wake_master_thread(), trx_struct::support_xa, trx_mark_sql_stat_end(), trx_prepare_for_mysql(), ut_ad, and trx_struct::xid.
|
virtual |
This function is used to recover X/Open XA distributed transactions.
xid_list | in/out: prepared transactions |
len | in: number of slots in xid_list |
Definition at line 9304 of file ha_innodb.cc.
References trx_recover_for_mysql().
|
virtual |
This function is used to rollback one X/Open XA distributed transaction which is in the prepared state
xid | in: X/Open XA transaction identification |
Definition at line 9348 of file ha_innodb.cc.
References innobase_rollback_trx(), and trx_get_trx_by_xid().
|
virtual |
Flushes InnoDB logs to disk and makes a checkpoint. Really, a commit flushes the logs, and the name of this function should be innobase_checkpoint.
Definition at line 2731 of file ha_innodb.cc.
References log_buffer_flush_to_disk().
UNIV_INTERN uint32_t InnobaseEngine::max_supported_key_length | ( | void | ) | const |
Returns the maximum key length.
Definition at line 3147 of file ha_innodb.cc.
UNIV_INTERN uint InnobaseEngine::max_supported_keys | ( | void | ) | const |