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