32 #ifndef UNIV_HOTBACKUP
106 UNIV_COLD __attribute__((nonnull));
126 #define trx_start_if_not_started_xa(t) \
128 (t)->start_line = __LINE__; \
129 (t)->start_file = __FILE__; \
130 trx_start_if_not_started_xa_low((t)); \
133 #define trx_start_if_not_started_xa(t) \
134 trx_start_if_not_started_xa_low((t))
153 #define trx_start_if_not_started(t) \
155 (t)->start_line = __LINE__; \
156 (t)->start_file = __FILE__; \
157 trx_start_if_not_started_low((t)); \
160 #define trx_start_if_not_started(t) \
161 trx_start_if_not_started_low((t))
172 __attribute__((nonnull));
175 #define trx_start_for_ddl(t, o) \
177 ut_ad((t)->start_file == 0); \
178 (t)->start_line = __LINE__; \
179 (t)->start_file = __FILE__; \
180 trx_start_for_ddl_low((t), (o)); \
183 #define trx_start_for_ddl(t, o) \
184 trx_start_for_ddl_low((t), (o))
194 __attribute__((nonnull));
204 __attribute__((nonnull(1)));
258 __attribute__((nonnull));
320 __attribute__((nonnull));
334 __attribute__((nonnull));
347 __attribute__((nonnull));
357 __attribute__((pure));
368 #ifndef UNIV_HOTBACKUP
386 __attribute__((nonnull, warn_unused_result));
397 __attribute__((nonnull, warn_unused_result));
417 #define trx_is_interrupted(trx) FALSE
425 #define TRX_WEIGHT(t) ((t)->undo_no + UT_LIST_GET_LEN((t)->lock.trx_locks))
441 #define TRX_QUE_STATE_STR_MAX_LEN 12
469 #define trx_lock_wait_timeout_get(trx) \
470 ((trx)->mysql_thd != NULL \
471 ? thd_lock_wait_timeout((trx)->mysql_thd) \
479 #define trx_is_autocommit_non_locking(t) \
480 ((t)->auto_commit && (t)->will_lock == 0)
487 #define trx_is_ac_nl_ro(t) \
488 ((t)->read_only && trx_is_autocommit_non_locking((t)))
492 #define assert_trx_in_rw_list(t) do { \
493 ut_ad(!(t)->read_only); \
494 assert_trx_in_list(t); \
501 #define assert_trx_in_list(t) do { \
502 ut_ad((t)->in_ro_trx_list == (t)->read_only); \
503 ut_ad((t)->in_rw_trx_list == !(t)->read_only); \
504 ut_ad(!trx_is_autocommit_non_locking((t))); \
505 switch ((t)->state) { \
506 case TRX_STATE_PREPARED: \
508 case TRX_STATE_ACTIVE: \
509 case TRX_STATE_COMMITTED_IN_MEMORY: \
511 case TRX_STATE_NOT_STARTED: \
522 # define assert_trx_nonlocking_or_in_list(t) \
524 if (trx_is_autocommit_non_locking(t)) { \
525 trx_state_t t_state = (t)->state; \
526 ut_ad((t)->read_only); \
527 ut_ad(!(t)->is_recovered); \
528 ut_ad(!(t)->in_ro_trx_list); \
529 ut_ad(!(t)->in_rw_trx_list); \
530 ut_ad((t)->in_mysql_trx_list); \
531 ut_ad(t_state == TRX_STATE_NOT_STARTED \
532 || t_state == TRX_STATE_ACTIVE); \
534 assert_trx_in_list(t); \
542 # define assert_trx_nonlocking_or_in_list(trx) ((void)0)
608 UT_LIST_BASE_NODE_T(
lock_t)
631 #define TRX_MAGIC_N 91118598
756 ulint check_foreigns;
765 unsigned is_registered:1;
769 unsigned owns_prepare_mutex:1;
774 ulint check_unique_secondary;
786 ulint flush_log_later;
792 ulint must_flush_log_later;
799 ulint has_search_latch;
802 ulint search_latch_timeout;
815 ulint declared_to_be_inside_innodb;
820 ulint n_tickets_to_enter_innodb;
825 ulint dict_operation_lock_mode;
851 const char* mysql_log_file_name;
856 ib_int64_t mysql_log_offset;
861 ulint n_mysql_tables_in_use;
864 ulint mysql_n_tables_locked;
869 UT_LIST_NODE_T(
trx_t)
883 UT_LIST_NODE_T(
trx_t)
887 ibool in_mysql_trx_list;
960 ulint n_autoinc_rows;
1005 char detailed_error[256];
1010 #define TRX_ISO_READ_UNCOMMITTED 0
1019 #define TRX_ISO_READ_COMMITTED 1
1032 #define TRX_ISO_REPEATABLE_READ 2
1040 #define TRX_ISO_SERIALIZABLE 3
1046 #define TRX_DUP_IGNORE 1
1047 #define TRX_DUP_REPLACE 2
1051 #define TRX_SIG_NO_SIGNAL 0
1052 #define TRX_SIG_TOTAL_ROLLBACK 1
1053 #define TRX_SIG_ROLLBACK_TO_SAVEPT 2
1054 #define TRX_SIG_COMMIT 3
1055 #define TRX_SIG_BREAK_EXECUTION 5
1058 #define TRX_SIG_SELF 0
1061 #define TRX_SIG_OTHER_SESS 1
1081 #define trx_mutex_own(t) mutex_own(&t->mutex)
1084 #define trx_mutex_enter(t) do { \
1085 mutex_enter(&t->mutex); \
1089 #define trx_mutex_exit(t) do { \
1090 mutex_exit(&t->mutex); \
1109 #define btr_search_latch (*btr_search_latch_temp)