60
modified_non_trans_table(false)
63
/* true is not all entries in the engines[] support 2pc */
65
/* storage engines that registered in this transaction */
68
The purpose of this flag is to keep track of non-transactional
69
tables that were modified in scope of:
70
- transaction, when the variable is a member of
71
Session::transaction.all
72
- top-level statement or sub-statement, when the variable is a
73
member of Session::transaction.stmt
74
This member has the following life cycle:
75
* stmt.modified_non_trans_table is used to keep track of
76
modified non-transactional tables of top-level statements. At
77
the end of the previous statement and at the beginning of the session,
78
it is reset to false. If such functions
79
as mysql_insert, mysql_update, mysql_delete etc modify a
80
non-transactional table, they set this flag to true. At the
81
end of the statement, the value of stmt.modified_non_trans_table
82
is merged with all.modified_non_trans_table and gets reset.
83
* all.modified_non_trans_table is reset at the end of transaction
85
* Since we do not have a dedicated context for execution of a
86
sub-statement, to keep track of non-transactional changes in a
87
sub-statement, we re-use stmt.modified_non_trans_table.
88
At entrance into a sub-statement, a copy of the value of
89
stmt.modified_non_trans_table (containing the changes of the
90
outer statement) is saved on stack. Then
91
stmt.modified_non_trans_table is reset to false and the
92
substatement is executed. Then the new value is merged with the
95
bool modified_non_trans_table;
97
void reset() { no_2pc= false; modified_non_trans_table= false; }
100
54
typedef struct st_ha_create_information
102
56
const CHARSET_INFO *table_charset, *default_table_charset;