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-1335 USA. */ 15 16 #ifndef WSREP_VAR_H 17 #define WSREP_VAR_H 18 19 #include <my_config.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 33 class sys_var; 34 class set_var; 35 class THD; 36 37 int wsrep_init_vars(); 38 void wsrep_set_wsrep_on(); 39 40 #define CHECK_ARGS (sys_var *self, THD* thd, set_var *var) 41 #define UPDATE_ARGS (sys_var *self, THD* thd, enum_var_type type) 42 #define DEFAULT_ARGS (THD* thd, enum_var_type var_type) 43 #define INIT_ARGS (const char* opt) 44 45 extern bool wsrep_causal_reads_update UPDATE_ARGS; 46 extern bool wsrep_on_check CHECK_ARGS; 47 extern bool wsrep_on_update UPDATE_ARGS; 48 extern bool wsrep_sync_wait_update UPDATE_ARGS; 49 extern bool wsrep_start_position_check CHECK_ARGS; 50 extern bool wsrep_start_position_update UPDATE_ARGS; 51 extern bool wsrep_start_position_init INIT_ARGS; 52 53 extern bool wsrep_provider_check CHECK_ARGS; 54 extern bool wsrep_provider_update UPDATE_ARGS; 55 extern void wsrep_provider_init INIT_ARGS; 56 57 extern bool wsrep_provider_options_check CHECK_ARGS; 58 extern bool wsrep_provider_options_update UPDATE_ARGS; 59 extern void wsrep_provider_options_init INIT_ARGS; 60 61 extern bool wsrep_cluster_address_check CHECK_ARGS; 62 extern bool wsrep_cluster_address_update UPDATE_ARGS; 63 extern void wsrep_cluster_address_init INIT_ARGS; 64 65 extern bool wsrep_cluster_name_check CHECK_ARGS; 66 extern bool wsrep_cluster_name_update UPDATE_ARGS; 67 68 extern bool wsrep_node_name_check CHECK_ARGS; 69 extern bool wsrep_node_name_update UPDATE_ARGS; 70 71 extern bool wsrep_node_address_check CHECK_ARGS; 72 extern bool wsrep_node_address_update UPDATE_ARGS; 73 extern void wsrep_node_address_init INIT_ARGS; 74 75 extern bool wsrep_sst_method_check CHECK_ARGS; 76 extern bool wsrep_sst_method_update UPDATE_ARGS; 77 extern void wsrep_sst_method_init INIT_ARGS; 78 79 extern bool wsrep_sst_receive_address_check CHECK_ARGS; 80 extern bool wsrep_sst_receive_address_update UPDATE_ARGS; 81 82 extern bool wsrep_sst_auth_check CHECK_ARGS; 83 extern bool wsrep_sst_auth_update UPDATE_ARGS; 84 85 extern bool wsrep_sst_donor_check CHECK_ARGS; 86 extern bool wsrep_sst_donor_update UPDATE_ARGS; 87 88 extern bool wsrep_slave_threads_check CHECK_ARGS; 89 extern bool wsrep_slave_threads_update UPDATE_ARGS; 90 91 extern bool wsrep_desync_check CHECK_ARGS; 92 extern bool wsrep_desync_update UPDATE_ARGS; 93 94 extern bool wsrep_trx_fragment_size_check CHECK_ARGS; 95 extern bool wsrep_trx_fragment_size_update UPDATE_ARGS; 96 97 extern bool wsrep_trx_fragment_unit_update UPDATE_ARGS; 98 99 extern bool wsrep_max_ws_size_check CHECK_ARGS; 100 extern bool wsrep_max_ws_size_update UPDATE_ARGS; 101 102 extern bool wsrep_reject_queries_update UPDATE_ARGS; 103 104 extern bool wsrep_debug_update UPDATE_ARGS; 105 106 #else /* WITH_WSREP */ 107 108 #define wsrep_provider_init(X) 109 #define wsrep_init_vars() (0) 110 #define wsrep_start_position_init(X) 111 112 #endif /* WITH_WSREP */ 113 #endif /* WSREP_VAR_H */ 114