37
37
#include <drizzled/lex_string.h>
38
38
#include "drizzled/global_charset_info.h"
43
typedef struct st_key KEY;
45
typedef struct st_key_cache KEY_CACHE;
45
51
class StorageEngine;
59
/* true is not all entries in the engines[] support 2pc */
61
/* storage engines that registered in this transaction */
64
The purpose of this flag is to keep track of non-transactional
65
tables that were modified in scope of:
66
- transaction, when the variable is a member of
67
Session::transaction.all
68
- top-level statement or sub-statement, when the variable is a
69
member of Session::transaction.stmt
70
This member has the following life cycle:
71
* stmt.modified_non_trans_table is used to keep track of
72
modified non-transactional tables of top-level statements. At
73
the end of the previous statement and at the beginning of the session,
74
it is reset to false. If such functions
75
as mysql_insert, mysql_update, mysql_delete etc modify a
76
non-transactional table, they set this flag to true. At the
77
end of the statement, the value of stmt.modified_non_trans_table
78
is merged with all.modified_non_trans_table and gets reset.
79
* all.modified_non_trans_table is reset at the end of transaction
81
* Since we do not have a dedicated context for execution of a
82
sub-statement, to keep track of non-transactional changes in a
83
sub-statement, we re-use stmt.modified_non_trans_table.
84
At entrance into a sub-statement, a copy of the value of
85
stmt.modified_non_trans_table (containing the changes of the
86
outer statement) is saved on stack. Then
87
stmt.modified_non_trans_table is reset to false and the
88
substatement is executed. Then the new value is merged with the
91
bool modified_non_trans_table;
93
void reset() { no_2pc= false; modified_non_trans_table= false; }
48
96
typedef struct st_ha_create_information
52
100
uint64_t auto_increment_value;
53
101
uint32_t table_options;
54
102
uint32_t used_fields;
55
plugin::StorageEngine *db_type;
103
enum row_type row_type;
104
drizzled::plugin::StorageEngine *db_type;
56
105
bool table_existed; /* 1 in create if table existed */
58
st_ha_create_information() :
60
default_table_charset(0),
62
auto_increment_value(0),
70
108
typedef struct st_ha_alter_information
72
KeyInfo *key_info_buffer;
110
KEY *key_info_buffer;
73
111
uint32_t key_count;
74
112
uint32_t index_drop_count;
75
113
uint32_t *index_drop_buffer;
76
114
uint32_t index_add_count;
77
115
uint32_t *index_add_buffer;
80
st_ha_alter_information() :
136
163
uint32_t (*next) (range_seq_t seq, KEY_MULTI_RANGE *range);
139
} /* namespace drizzled */
167
This is a buffer area that the handler can use to store rows.
168
'end_of_used_area' should be kept updated after calls to
169
read-functions so that other parts of the code can use the
170
remaining area (until next read calls is issued).
173
typedef struct st_handler_buffer
175
unsigned char *buffer; /* Buffer one can start using */
176
unsigned char *buffer_end; /* End of buffer */
177
unsigned char *end_of_used_area; /* End of area that was used by handler */
141
180
#endif /* DRIZZLED_HANDLER_STRUCTS_H */