YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftwareFoundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
PFS_engine_table_share
table_events_transactions_current::m_share=
{
{ C_STRING_WITH_LEN("events_transactions_current") },
&pfs_truncatable_acl,
table_events_transactions_current::create,
NULL, /* write_row */
table_events_transactions_current::delete_all_rows,
table_events_transactions_current::get_row_count, sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_transactions_current(" "THREAD_ID BIGINT unsigned not null comment 'The thread associated with the event.'," "EVENT_ID BIGINT unsigned not null comment 'The event id associated with the event.'," "END_EVENT_ID BIGINT unsigned comment 'This column is set to NULL when the event starts and updated to the thread current event number when the event ends.'," "EVENT_NAME VARCHAR(128) not null comment 'The name of the instrument from which the event was collected. This is a NAME value from the setup_instruments table.'," "STATE ENUM('ACTIVE', 'COMMITTED', 'ROLLED BACK') comment 'The current transaction state. The value is ACTIVE (after START TRANSACTION or BEGIN), COMMITTED (after COMMIT), or ROLLED BACK (after ROLLBACK).'," "TRX_ID BIGINT unsigned comment 'Unused.'," "GTID VARCHAR(64) comment 'Transaction GTID, using the format DOMAIN-SERVER_ID-SEQUENCE_NO.'," "XID_FORMAT_ID INTEGER comment 'XA transaction format ID for GTRID and BQUAL values.'," "XID_GTRID VARCHAR(130) comment 'XA global transaction ID.'," "XID_BQUAL VARCHAR(130) comment 'XA transaction branch qualifier.'," "XA_STATE VARCHAR(64) comment 'The state of the XA transaction. The value is ACTIVE (after XA START), IDLE (after XA END), PREPARED (after XA PREPARE), ROLLED BACK (after XA ROLLBACK), or COMMITTED (after XA COMMIT).'," "SOURCE VARCHAR(64) comment 'The name of the source file containing the instrumented code that produced the event and the line number in the file at which the instrumentation occurs.'," "TIMER_START BIGINT unsigned comment 'The unit is picoseconds. When event timing started. NULL if event has no timing information.'," "TIMER_END BIGINT unsigned comment 'The unit is picoseconds. When event timing ended. NULL if event has no timing information.'," "TIMER_WAIT BIGINT unsigned comment 'The unit is picoseconds. Event duration. NULL if event has not timing information.'," "ACCESS_MODE ENUM('READ ONLY', 'READ WRITE') comment 'Transaction access mode.'," "ISOLATION_LEVEL VARCHAR(64) comment 'Transaction isolation level. One of: REPEATABLE READ, READ COMMITTED, READ UNCOMMITTED, or SERIALIZABLE.'," "AUTOCOMMIT ENUM('YES','NO') not null comment 'Whether autcommit mode was enabled when the transaction started.'," "NUMBER_OF_SAVEPOINTS BIGINT unsigned comment 'The number of SAVEPOINT statements issued during the transaction.'," "NUMBER_OF_ROLLBACK_TO_SAVEPOINT BIGINT unsigned comment 'The number of ROLLBACK_TO_SAVEPOINT statements issued during the transaction.'," "NUMBER_OF_RELEASE_SAVEPOINT BIGINT unsigned comment 'The number of RELEASE_SAVEPOINT statements issued during the transaction.'," "OBJECT_INSTANCE_BEGIN BIGINT unsigned comment 'Unused.'," "NESTING_EVENT_ID BIGINT unsigned comment 'The EVENT_ID value of the event within which this event is nested.'," "NESTING_EVENT_TYPE ENUM('TRANSACTION', 'STATEMENT', 'STAGE', 'WAIT') comment 'The nesting event type.')")}, false, /* m_perpetual */ false, /* m_optional */
&m_share_state
};
PFS_engine_table_share
table_events_transactions_history::m_share=
{
{ C_STRING_WITH_LEN("events_transactions_history") },
&pfs_truncatable_acl,
table_events_transactions_history::create,
NULL, /* write_row */
table_events_transactions_history::delete_all_rows,
table_events_transactions_history::get_row_count, sizeof(pos_events_transactions_history), /* ref length */
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_transactions_history(" "THREAD_ID BIGINT unsigned not null comment 'The thread associated with the event.'," "EVENT_ID BIGINT unsigned not null comment 'The event id associated with the event.'," "END_EVENT_ID BIGINT unsigned comment 'This column is set to NULL when the event starts and updated to the thread current event number when the event ends.'," "EVENT_NAME VARCHAR(128) not null comment 'The name of the instrument from which the event was collected. This is a NAME value from the setup_instruments table.'," "STATE ENUM('ACTIVE', 'COMMITTED', 'ROLLED BACK') comment 'The current transaction state. The value is ACTIVE (after START TRANSACTION or BEGIN), COMMITTED (after COMMIT), or ROLLED BACK (after ROLLBACK).'," "TRX_ID BIGINT unsigned comment 'Unused.'," "GTID VARCHAR(64) comment 'Transaction GTID, using the format DOMAIN-SERVER_ID-SEQUENCE_NO.'," "XID_FORMAT_ID INTEGER comment 'XA transaction format ID for GTRID and BQUAL values.'," "XID_GTRID VARCHAR(130) comment 'XA global transaction ID.'," "XID_BQUAL VARCHAR(130) comment 'XA transaction branch qualifier.'," "XA_STATE VARCHAR(64) comment 'The state of the XA transaction. The value is ACTIVE (after XA START), IDLE (after XA END), PREPARED (after XA PREPARE), ROLLED BACK (after XA ROLLBACK), or COMMITTED (after XA COMMIT).'," "SOURCE VARCHAR(64) comment 'The name of the source file containing the instrumented code that produced the event and the line number in the file at which the instrumentation occurs.'," "TIMER_START BIGINT unsigned comment 'The unit is picoseconds. When event timing started. NULL if event has no timing information.'," "TIMER_END BIGINT unsigned comment 'The unit is picoseconds. When event timing ended. NULL if event has no timing information.'," "TIMER_WAIT BIGINT unsigned comment 'The unit is picoseconds. Event duration. NULL if event has not timing information.'," "ACCESS_MODE ENUM('READ ONLY', 'READ WRITE') comment 'Transaction access mode.'," "ISOLATION_LEVEL VARCHAR(64) comment 'Transaction isolation level. One of: REPEATABLE READ, READ COMMITTED, READ UNCOMMITTED, or SERIALIZABLE.'," "AUTOCOMMIT ENUM('YES','NO') not null comment 'Whether autcommit mode was enabled when the transaction started.'," "NUMBER_OF_SAVEPOINTS BIGINT unsigned comment 'The number of SAVEPOINT statements issued during the transaction.'," "NUMBER_OF_ROLLBACK_TO_SAVEPOINT BIGINT unsigned comment 'The number of ROLLBACK_TO_SAVEPOINT statements issued during the transaction.'," "NUMBER_OF_RELEASE_SAVEPOINT BIGINT unsigned comment 'The number of RELEASE_SAVEPOINT statements issued during the transaction.'," "OBJECT_INSTANCE_BEGIN BIGINT unsigned comment 'Unused.'," "NESTING_EVENT_ID BIGINT unsigned comment 'The EVENT_ID value of the event within which this event is nested.'," "NESTING_EVENT_TYPE ENUM('TRANSACTION', 'STATEMENT', 'STAGE', 'WAIT') comment 'The nesting event type.')")}, false, /* m_perpetual */ false, /* m_optional */
&m_share_state
};
PFS_engine_table_share
table_events_transactions_history_long::m_share=
{
{ C_STRING_WITH_LEN("events_transactions_history_long") },
&pfs_truncatable_acl,
table_events_transactions_history_long::create,
NULL, /* write_row */
table_events_transactions_history_long::delete_all_rows,
table_events_transactions_history_long::get_row_count, sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_transactions_history_long(" "THREAD_ID BIGINT unsigned not null comment 'The thread associated with the event.'," "EVENT_ID BIGINT unsigned not null comment 'The event id associated with the event.'," "END_EVENT_ID BIGINT unsigned comment 'This column is set to NULL when the event starts and updated to the thread current event number when the event ends.'," "EVENT_NAME VARCHAR(128) not null comment 'The name of the instrument from which the event was collected. This is a NAME value from the setup_instruments table.'," "STATE ENUM('ACTIVE', 'COMMITTED', 'ROLLED BACK') comment 'The current transaction state. The value is ACTIVE (after START TRANSACTION or BEGIN), COMMITTED (after COMMIT), or ROLLED BACK (after ROLLBACK).'," "TRX_ID BIGINT unsigned comment 'Unused.'," "GTID VARCHAR(64) comment 'Transaction GTID, using the format DOMAIN-SERVER_ID-SEQUENCE_NO.'," "XID_FORMAT_ID INTEGER comment 'XA transaction format ID for GTRID and BQUAL values.'," "XID_GTRID VARCHAR(130) comment 'XA global transaction ID.'," "XID_BQUAL VARCHAR(130) comment 'XA transaction branch qualifier.'," "XA_STATE VARCHAR(64) comment 'The state of the XA transaction. The value is ACTIVE (after XA START), IDLE (after XA END), PREPARED (after XA PREPARE), ROLLED BACK (after XA ROLLBACK), or COMMITTED (after XA COMMIT).'," "SOURCE VARCHAR(64) comment 'The name of the source file containing the instrumented code that produced the event and the line number in the file at which the instrumentation occurs.'," "TIMER_START BIGINT unsigned comment 'The unit is picoseconds. When event timing started. NULL if event has no timing information.'," "TIMER_END BIGINT unsigned comment 'The unit is picoseconds. When event timing ended. NULL if event has no timing information.'," "TIMER_WAIT BIGINT unsigned comment 'The unit is picoseconds. Event duration. NULL if event has not timing information.'," "ACCESS_MODE ENUM('READ ONLY', 'READ WRITE') comment 'Transaction access mode.'," "ISOLATION_LEVEL VARCHAR(64) comment 'Transaction isolation level. One of: REPEATABLE READ, READ COMMITTED, READ UNCOMMITTED, or SERIALIZABLE.'," "AUTOCOMMIT ENUM('YES','NO') not null comment 'Whether autcommit mode was enabled when the transaction started.'," "NUMBER_OF_SAVEPOINTS BIGINT unsigned comment 'The number of SAVEPOINT statements issued during the transaction.'," "NUMBER_OF_ROLLBACK_TO_SAVEPOINT BIGINT unsigned comment 'The number of ROLLBACK_TO_SAVEPOINT statements issued during the transaction.'," "NUMBER_OF_RELEASE_SAVEPOINT BIGINT unsigned comment 'The number of RELEASE_SAVEPOINT statements issued during the transaction.'," "OBJECT_INSTANCE_BEGIN BIGINT unsigned comment 'Unused.'," "NESTING_EVENT_ID BIGINT unsigned comment 'The EVENT_ID value of the event within which this event is nested.'," "NESTING_EVENT_TYPE ENUM('TRANSACTION', 'STATEMENT', 'STAGE', 'WAIT') comment 'The nesting event type.')")}, false, /* m_perpetual */ false, /* m_optional */
&m_share_state
};
/* Disable source file and line to avoid stale __FILE__ pointers. */
m_row.m_source_length= 0;
/* A GTID consists of the SID (source id) and GNO (transaction number). TheSIDisstoredintransaction->m_sidandtheGNOisstoredin transaction->m_gtid_spec.gno.
int table_events_transactions_history::rnd_init(bool scan)
{ return0;
}
int table_events_transactions_history::rnd_next(void)
{
PFS_thread *pfs_thread;
PFS_events_transactions *transaction; bool has_more_thread= true;
if (events_transactions_history_per_thread == 0) return HA_ERR_END_OF_FILE;
for (m_pos.set_at(&m_next_pos);
has_more_thread;
m_pos.next_thread())
{
pfs_thread= global_thread_container.get(m_pos.m_index_1, & has_more_thread); if (pfs_thread != NULL)
{ if (m_pos.m_index_2 >= events_transactions_history_per_thread)
{ /* This thread does not have more (full) history */ continue;
}
if ( ! pfs_thread->m_transactions_history_full &&
(m_pos.m_index_2 >= pfs_thread->m_transactions_history_index))
{ /* This thread does not have more (not full) history */ continue;
}
transaction= &pfs_thread->m_transactions_history[m_pos.m_index_2]; if (transaction->m_class != NULL)
{
make_row(transaction); /* Next iteration, look for the next history in this thread */
m_next_pos.set_after(&m_pos); return0;
}
}
}
return HA_ERR_END_OF_FILE;
}
int table_events_transactions_history::rnd_pos(constvoid *pos)
{
PFS_thread *pfs_thread;
PFS_events_transactions *transaction;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.