1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| struct Transaction_state { Transaction_state(); THD::Transaction_state::Transaction_state() : m_query_tables_list(new Query_tables_list()), m_ha_data(PSI_NOT_INSTRUMENTED, m_ha_data.initial_capacity) {} ~Transaction_state(); void backup(THD *thd); void restore(THD *thd);
/// SQL-command. enum_sql_command m_sql_command;
Query_tables_list *m_query_tables_list;
/// Open-tables state. Open_tables_backup m_open_tables_state;
/// SQL_MODE. sql_mode_t m_sql_mode;
/// Transaction isolation level. RU/RC/RR/Serialization enum_tx_isolation m_tx_isolation;
/// Ha_data array. Prealloced_array<Ha_data, PREALLOC_NUM_HA> m_ha_data;
/// Transaction_ctx instance. Transaction_ctx *m_trx;
/// Transaction read-only state. bool m_tx_read_only;
/// THD options. ulonglong m_thd_option_bits;
/// Current transaction instrumentation. PSI_transaction_locker *m_transaction_psi;
/// Server status flags. uint m_server_status;
/// THD::in_lock_tables value. bool m_in_lock_tables;
/** 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;
PPI_transaction *m_ppi_transaction; }
|