MySQL  8.0.19
Source Code Documentation
synode_no.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef SYNODE_NO_H
24 #define SYNODE_NO_H
25 
28 #include "plugin/group_replication/libmysqlgcs/xdr_gen/xcom_vp.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #define FILENAME_SYNODE_FMT "%x_%PRIu64%u"
35 #define FILENAME_SYNODE_MEM(x) SY_MEM(x)
36 #define NULL_SYNODE \
37  { 0ul, 0ull, 0ull }
38 #define SY_FMT "{" SY_FMT_DEF "}"
39 #define SY_FMT_DEF "%x %" PRIu64 " %u"
40 #define SY_MEM(s) (s).group_id, (uint64_t)(s).msgno, (s).node
41 
42 int synode_eq(synode_no x, synode_no y);
43 int synode_gt(synode_no x, synode_no y);
44 int synode_lt(synode_no x, synode_no y);
45 static const synode_no null_synode = NULL_SYNODE;
46 synode_no vp_count_to_synode(u_long high, u_long low, node_no nodeid,
47  uint32_t groupid);
48 void add_synode_event(synode_no const synode);
49 
50 void synode_array_move(synode_no_array *const to, synode_no_array *const from);
51 void synode_app_data_array_move(synode_app_data_array *const to,
52  synode_app_data_array *const from);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif
xdr_utils.h
synode_app_data_array_move
void synode_app_data_array_move(synode_app_data_array *const to, synode_app_data_array *const from)
Definition: synode_no.c:94
NULL_SYNODE
#define NULL_SYNODE
Definition: synode_no.h:36
synode_lt
int synode_lt(synode_no x, synode_no y)
Definition: synode_no.c:41
null_synode
static const synode_no null_synode
Definition: synode_no.h:45
add_synode_event
void add_synode_event(synode_no const synode)
u_long
__u_long u_long
Definition: types.h:74
synode_array_move
void synode_array_move(synode_no_array *const to, synode_no_array *const from)
Definition: synode_no.c:85
xcom_common.h
vp_count_to_synode
synode_no vp_count_to_synode(u_long high, u_long low, node_no nodeid, uint32_t groupid)
Definition: synode_no.c:65
synode_eq
int synode_eq(synode_no x, synode_no y)
Definition: synode_no.c:37
synode_gt
int synode_gt(synode_no x, synode_no y)
Definition: synode_no.c:46