diff options
Diffstat (limited to 'sql/wsrep_sst.h')
-rw-r--r-- | sql/wsrep_sst.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/sql/wsrep_sst.h b/sql/wsrep_sst.h index 29724a00797..46059a7f436 100644 --- a/sql/wsrep_sst.h +++ b/sql/wsrep_sst.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 Codership Oy <info@codership.com> +/* Copyright (C) 2013-2018 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 @@ -13,14 +13,14 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <my_config.h> - #ifndef WSREP_SST_H #define WSREP_SST_H -#ifdef WITH_WSREP +#include <my_config.h> -#include <mysql.h> // my_bool +#include "wsrep/gtid.hpp" +#include <my_global.h> +#include <string> #define WSREP_SST_OPT_ROLE "--role" #define WSREP_SST_OPT_ADDR "--address" @@ -77,11 +77,29 @@ 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 */ +/** + Return a string containing the state transfer request string. + Note that the string may contain a '\0' in the middle. +*/ +std::string wsrep_sst_prepare(); + +/** + Donate a SST. + + @param request SST request string received from the joiner. Note that + the string may contain a '\0' in the middle. + @param gtid Current position of the donor + @param bypass If true, full SST is not needed. Joiner needs to be + notified that it can continue starting from gtid. + */ +int wsrep_sst_donate(const std::string& request, + const wsrep::gtid& gtid, + bool bypass); + #else #define wsrep_SE_initialized() do { } while(0) #define wsrep_SE_init_grab() do { } while(0) #define wsrep_SE_init_done() do { } while(0) #define wsrep_sst_continue() (0) -#endif /* WITH_WSREP */ #endif /* WSREP_SST_H */ |