44
44
i_s_trx_row_t::trx_query */
45
45
#define TRX_I_S_TRX_QUERY_MAX_LEN 1024
47
/** The maximum length of a string that can be stored in
48
i_s_trx_row_t::trx_operation_state */
49
#define TRX_I_S_TRX_OP_STATE_MAX_LEN 64
51
/** The maximum length of a string that can be stored in
52
i_s_trx_row_t::trx_foreign_key_error */
53
#define TRX_I_S_TRX_FK_ERROR_MAX_LEN 256
55
/** The maximum length of a string that can be stored in
56
i_s_trx_row_t::trx_isolation_level */
57
#define TRX_I_S_TRX_ISOLATION_LEVEL_MAX_LEN 16
59
/** Safely copy strings in to the INNODB_TRX table's
60
string based columns */
61
#define TRX_I_S_STRING_COPY(data, field, constraint, tcache) \
63
if (strlen(data) > constraint) { \
64
char buff[constraint + 1]; \
65
strncpy(buff, data, constraint); \
66
buff[constraint] = '\0'; \
68
field = ha_storage_put_memlim( \
69
(tcache)->storage, buff, constraint + 1,\
70
MAX_ALLOWED_FOR_STORAGE(tcache)); \
72
field = ha_storage_put_str_memlim( \
73
(tcache)->storage, data, \
74
MAX_ALLOWED_FOR_STORAGE(tcache)); \
47
78
/** A row of INFORMATION_SCHEMA.innodb_locks */
48
79
typedef struct i_s_locks_row_struct i_s_locks_row_t;
49
80
/** A row of INFORMATION_SCHEMA.innodb_trx */
96
127
/** This structure represents INFORMATION_SCHEMA.innodb_trx row */
97
128
struct i_s_trx_row_struct {
98
ullint trx_id; /*!< transaction identifier */
99
const char* trx_state; /*!< transaction state from
100
trx_get_que_state_str() */
101
ib_time_t trx_started; /*!< trx_struct::start_time */
129
ullint trx_id; /*!< transaction identifier */
130
const char* trx_state; /*!< transaction state from
131
trx_get_que_state_str() */
132
ib_time_t trx_started; /*!< trx_struct::start_time */
102
133
const i_s_locks_row_t* requested_lock_row;
103
/*!< pointer to a row
104
in innodb_locks if trx
105
is waiting, or NULL */
106
ib_time_t trx_wait_started;
107
/*!< trx_struct::wait_started */
108
ullint trx_weight; /*!< TRX_WEIGHT() */
109
ulint trx_mysql_thread_id;
110
/*!< thd_get_thread_id() */
111
const char* trx_query; /*!< MySQL statement being
112
executed in the transaction */
134
/*!< pointer to a row
135
in innodb_locks if trx
136
is waiting, or NULL */
137
ib_time_t trx_wait_started; /*!< trx_struct::wait_started */
138
ullint trx_weight; /*!< TRX_WEIGHT() */
139
ulint trx_mysql_thread_id; /*!< thd_get_thread_id() */
140
const char* trx_query; /*!< MySQL statement being
141
executed in the transaction */
142
const char* trx_operation_state; /*!< trx_struct::op_info */
143
ulint trx_tables_in_use;/*!< n_mysql_tables_in_use in
145
ulint trx_tables_locked;
146
/*!< mysql_n_tables_locked in
148
ulint trx_lock_structs;/*!< list len of trx_locks in
150
ulint trx_lock_memory_bytes;
151
/*!< mem_heap_get_size(
153
ulint trx_rows_locked;/*!< lock_number_of_rows_locked() */
154
ullint trx_rows_modified;/*!< trx_struct::undo_no */
155
ulint trx_concurrency_tickets;
156
/*!< n_tickets_to_enter_innodb in
158
const char* trx_isolation_level;
159
/*!< isolation_level in trx_struct*/
160
ibool trx_unique_checks;
161
/*!< check_unique_secondary in
163
ibool trx_foreign_key_checks;
164
/*!< check_foreigns in trx_struct */
165
const char* trx_foreign_key_error;
166
/*!< detailed_error in trx_struct */
167
ibool trx_has_search_latch;
168
/*!< has_search_latch in trx_struct */
169
ulint trx_search_latch_timeout;
170
/*!< search_latch_timeout in
115
174
/** This structure represents INFORMATION_SCHEMA.innodb_lock_waits row */