2014-08-06 14:39:15 +02:00
|
|
|
/* Copyright (C) 2013 Codership Oy <info@codership.com>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; version 2 of the License.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
|
|
|
|
|
2014-09-25 23:00:45 +02:00
|
|
|
#include <my_config.h>
|
|
|
|
|
|
|
|
#ifndef WSREP_SST_H
|
2014-08-06 14:39:15 +02:00
|
|
|
#define WSREP_SST_H
|
|
|
|
|
2014-09-25 23:00:45 +02:00
|
|
|
#ifdef WITH_WSREP
|
|
|
|
|
2014-08-06 14:39:15 +02:00
|
|
|
#include <mysql.h> // my_bool
|
|
|
|
|
|
|
|
#define WSREP_SST_OPT_ROLE "--role"
|
|
|
|
#define WSREP_SST_OPT_ADDR "--address"
|
|
|
|
#define WSREP_SST_OPT_AUTH "--auth"
|
|
|
|
#define WSREP_SST_OPT_DATA "--datadir"
|
|
|
|
#define WSREP_SST_OPT_CONF "--defaults-file"
|
2014-09-26 15:54:42 +02:00
|
|
|
#define WSREP_SST_OPT_EXTRA_CONF "--defaults-extra-file"
|
2014-08-06 14:39:15 +02:00
|
|
|
#define WSREP_SST_OPT_PARENT "--parent"
|
|
|
|
#define WSREP_SST_OPT_BINLOG "--binlog"
|
|
|
|
|
|
|
|
// mysqldump-specific options
|
|
|
|
#define WSREP_SST_OPT_USER "--user"
|
|
|
|
#define WSREP_SST_OPT_PSWD "--password"
|
|
|
|
#define WSREP_SST_OPT_HOST "--host"
|
|
|
|
#define WSREP_SST_OPT_PORT "--port"
|
|
|
|
#define WSREP_SST_OPT_LPORT "--local-port"
|
|
|
|
|
|
|
|
// donor-specific
|
|
|
|
#define WSREP_SST_OPT_SOCKET "--socket"
|
|
|
|
#define WSREP_SST_OPT_GTID "--gtid"
|
|
|
|
#define WSREP_SST_OPT_BYPASS "--bypass"
|
2015-02-28 04:33:41 +01:00
|
|
|
#define WSREP_SST_OPT_GTID_DOMAIN_ID "--gtid-domain-id"
|
2014-08-06 14:39:15 +02:00
|
|
|
|
|
|
|
#define WSREP_SST_MYSQLDUMP "mysqldump"
|
|
|
|
#define WSREP_SST_RSYNC "rsync"
|
|
|
|
#define WSREP_SST_SKIP "skip"
|
|
|
|
#define WSREP_SST_DEFAULT WSREP_SST_RSYNC
|
|
|
|
#define WSREP_SST_ADDRESS_AUTO "AUTO"
|
|
|
|
#define WSREP_SST_AUTH_MASK "********"
|
|
|
|
|
|
|
|
/* system variables */
|
|
|
|
extern const char* wsrep_sst_method;
|
|
|
|
extern const char* wsrep_sst_receive_address;
|
|
|
|
extern const char* wsrep_sst_donor;
|
2016-07-30 20:40:47 +02:00
|
|
|
extern const char* wsrep_sst_auth;
|
|
|
|
extern my_bool wsrep_sst_donor_rejects_queries;
|
2014-08-06 14:39:15 +02:00
|
|
|
|
|
|
|
/*! Synchronizes applier thread start with init thread */
|
|
|
|
extern void wsrep_sst_grab();
|
|
|
|
/*! Init thread waits for SST completion */
|
|
|
|
extern bool wsrep_sst_wait();
|
|
|
|
/*! Signals wsrep that initialization is complete, writesets can be applied */
|
2016-06-01 02:37:00 +02:00
|
|
|
extern bool wsrep_sst_continue();
|
2016-08-03 19:36:12 +02:00
|
|
|
extern void wsrep_sst_auth_init();
|
2014-08-06 14:39:15 +02:00
|
|
|
extern void wsrep_sst_auth_free();
|
|
|
|
|
|
|
|
extern void wsrep_SE_init_grab(); /*! grab init critical section */
|
|
|
|
extern void wsrep_SE_init_wait(); /*! wait for SE init to complete */
|
|
|
|
extern void wsrep_SE_init_done(); /*! signal that SE init is complte */
|
|
|
|
extern void wsrep_SE_initialized(); /*! mark SE initialization complete */
|
|
|
|
|
2014-09-25 23:00:45 +02:00
|
|
|
#else
|
|
|
|
#define wsrep_SE_initialized() do { } while(0)
|
|
|
|
#define wsrep_SE_init_grab() do { } while(0)
|
|
|
|
#define wsrep_SE_init_done() do { } while(0)
|
2016-06-01 19:15:38 +02:00
|
|
|
#define wsrep_sst_continue() (0)
|
2014-09-25 23:00:45 +02:00
|
|
|
|
|
|
|
#endif /* WITH_WSREP */
|
2014-08-06 14:39:15 +02:00
|
|
|
#endif /* WSREP_SST_H */
|