21 #include <my_global.h>
24 #include <my_bitmap.h>
26 #include <ndbapi/Ndb.hpp>
28 enum NDB_SHARE_STATE {
35 enum enum_conflict_fn_type
45 #ifdef HAVE_NDB_BINLOG
46 static const Uint32 MAX_CONFLICT_ARGS= 8;
48 enum enum_conflict_fn_arg_type
55 struct st_conflict_fn_arg
57 enum_conflict_fn_arg_type
type;
67 struct st_conflict_fn_arg_def
69 enum enum_conflict_fn_arg_type arg_type;
74 enum enum_conflicting_op_type
87 typedef int (* prepare_detect_func) (
struct NDB_CONFLICT_FN_SHARE* cfn_share,
88 enum_conflicting_op_type op_type,
89 const uchar* old_data,
90 const uchar* new_data,
94 struct st_conflict_fn_def
97 enum_conflict_fn_type
type;
98 const st_conflict_fn_arg_def* arg_defs;
99 prepare_detect_func prep_func;
103 enum enum_conflict_cause
111 struct Ndb_exceptions_data {
115 enum_conflicting_op_type op_type;
118 enum enum_conflict_fn_flags
124 struct NDB_CONFLICT_FN_SHARE {
125 const st_conflict_fn_def* m_conflict_fn;
129 uint8 m_resolve_column;
130 uint8 m_resolve_size;
133 uint16 m_resolve_offset;
148 Uint64 fragment_memory;
149 Uint64 fragment_extent_space;
150 Uint64 fragment_extent_free_space;
155 NDB_SHARE_STATE state;
158 pthread_mutex_t mutex;
163 uint commit_count_lock;
164 ulonglong commit_count;
169 struct Ndb_index_stat* index_stat_list;
171 uint32 connect_count;
173 #ifdef HAVE_NDB_BINLOG
174 NDB_CONFLICT_FN_SHARE *m_cfn_share;
188 NDB_SHARE_STATE state;
189 pthread_mutex_lock(&share->mutex);
191 pthread_mutex_unlock(&share->mutex);
198 set_ndb_share_state(
NDB_SHARE *share, NDB_SHARE_STATE state)
200 pthread_mutex_lock(&share->mutex);
202 pthread_mutex_unlock(&share->mutex);