1/* Copyright (C) 2013 Codership Oy <info@codership.com>
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 as published by
5 the Free Software Foundation; version 2 of the License.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License along
13 with this program; if not, write to the Free Software Foundation, Inc.,
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
15
16#include <my_config.h>
17
18#ifndef WSREP_VAR_H
19#define WSREP_VAR_H
20
21#ifdef WITH_WSREP
22
23#define WSREP_CLUSTER_NAME "my_wsrep_cluster"
24#define WSREP_NODE_INCOMING_AUTO "AUTO"
25#define WSREP_START_POSITION_ZERO "00000000-0000-0000-0000-000000000000:-1"
26
27// MySQL variables funcs
28
29#include "sql_priv.h"
30#include <sql_plugin.h>
31#include <mysql/plugin.h>
32
33class sys_var;
34class set_var;
35class THD;
36
37int wsrep_init_vars();
38
39#define CHECK_ARGS (sys_var *self, THD* thd, set_var *var)
40#define UPDATE_ARGS (sys_var *self, THD* thd, enum_var_type type)
41#define DEFAULT_ARGS (THD* thd, enum_var_type var_type)
42#define INIT_ARGS (const char* opt)
43
44extern bool wsrep_causal_reads_update UPDATE_ARGS;
45extern bool wsrep_on_check CHECK_ARGS;
46extern bool wsrep_on_update UPDATE_ARGS;
47extern bool wsrep_sync_wait_update UPDATE_ARGS;
48extern bool wsrep_start_position_check CHECK_ARGS;
49extern bool wsrep_start_position_update UPDATE_ARGS;
50extern bool wsrep_start_position_init INIT_ARGS;
51
52extern bool wsrep_provider_check CHECK_ARGS;
53extern bool wsrep_provider_update UPDATE_ARGS;
54extern void wsrep_provider_init INIT_ARGS;
55
56extern bool wsrep_provider_options_check CHECK_ARGS;
57extern bool wsrep_provider_options_update UPDATE_ARGS;
58extern void wsrep_provider_options_init INIT_ARGS;
59
60extern bool wsrep_cluster_address_check CHECK_ARGS;
61extern bool wsrep_cluster_address_update UPDATE_ARGS;
62extern void wsrep_cluster_address_init INIT_ARGS;
63
64extern bool wsrep_cluster_name_check CHECK_ARGS;
65extern bool wsrep_cluster_name_update UPDATE_ARGS;
66
67extern bool wsrep_node_name_check CHECK_ARGS;
68extern bool wsrep_node_name_update UPDATE_ARGS;
69
70extern bool wsrep_node_address_check CHECK_ARGS;
71extern bool wsrep_node_address_update UPDATE_ARGS;
72extern void wsrep_node_address_init INIT_ARGS;
73
74extern bool wsrep_sst_method_check CHECK_ARGS;
75extern bool wsrep_sst_method_update UPDATE_ARGS;
76extern void wsrep_sst_method_init INIT_ARGS;
77
78extern bool wsrep_sst_receive_address_check CHECK_ARGS;
79extern bool wsrep_sst_receive_address_update UPDATE_ARGS;
80
81extern bool wsrep_sst_auth_check CHECK_ARGS;
82extern bool wsrep_sst_auth_update UPDATE_ARGS;
83
84extern bool wsrep_sst_donor_check CHECK_ARGS;
85extern bool wsrep_sst_donor_update UPDATE_ARGS;
86
87extern bool wsrep_slave_threads_check CHECK_ARGS;
88extern bool wsrep_slave_threads_update UPDATE_ARGS;
89
90extern bool wsrep_desync_check CHECK_ARGS;
91extern bool wsrep_desync_update UPDATE_ARGS;
92
93extern bool wsrep_max_ws_size_check CHECK_ARGS;
94extern bool wsrep_max_ws_size_update UPDATE_ARGS;
95extern bool wsrep_reject_queries_update UPDATE_ARGS;
96
97#else /* WITH_WSREP */
98
99#define WSREP_NONE
100#define wsrep_provider_init(X)
101#define wsrep_init_vars() (0)
102#define wsrep_start_position_init(X)
103
104#endif /* WITH_WSREP */
105#endif /* WSREP_VAR_H */
106