/** Current time zone (i.e. @@session.time_zone) usage indicator.
Saving it allows data-dictionary code to read timestamp values as datetimes from system tables without disturbing user's statement. TODO: We need to change DD code not to use @@session.time_zone at all and stick to UTC for internal storage of timestamps in DD objects. */ bool m_time_zone_used;
/** Transaction rollback request flag.
InnoDB can try to access table definition while rolling back regular transaction. So we need to be able to start attachable transaction without being affected by, and affecting, the rollback state of regular transaction. */ bool m_transaction_rollback_request;
class Transaction_ctx { SAVEPOINT *m_savepoints; THD_TRANS m_scope_info[2];
XID_STATE m_xid_state;
MEM_ROOT m_mem_root; // Transaction-life memory allocation pool
struct { bool enabled; // see ha_enable_transaction() bool xid_written; // The session wrote an XID bool real_commit; // Is this a "real" commit? bool commit_low; // see MYSQL_BIN_LOG::ordered_commit bool run_hooks; // Call the after_commit hook #ifndef DBUG_OFF bool ready_preempt; // internal in MYSQL_BIN_LOG::ordered_commit #endif } m_flags; /* Binlog-specific logical timestamps. */ /* Store for the transaction's commit parent sequence_number. The value specifies this transaction dependency with a "parent" transaction. The member is assigned, when the transaction is about to commit in binlog to a value of the last committed transaction's sequence_number. This and last_committed as numbers are kept ever incremented regardless of binary logs being rotated or when transaction is logged in multiple pieces. However the logger to the binary log may convert them according to its specification. */ int64 last_committed; /* The transaction's private logical timestamp assigned at the transaction prepare phase. The timestamp enumerates transactions in the binary log. The value is gained through incrementing (stepping) a global clock. Eventually the value is considered to increase max_committed_transaction system clock when the transaction has committed. */ int64 sequence_number;