| 1 | /* Copyright 2010 Codership Oy <http://www.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 |
| 13 | along with this program; if not, write to the Free Software |
| 14 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 15 | */ |
| 16 | |
| 17 | //! @file declares symbols private to wsrep integration layer |
| 18 | |
| 19 | #ifndef WSREP_PRIV_H |
| 20 | #define WSREP_PRIV_H |
| 21 | |
| 22 | #include "wsrep_mysqld.h" |
| 23 | #include "../wsrep/wsrep_api.h" |
| 24 | |
| 25 | #include <log.h> |
| 26 | #include <pthread.h> |
| 27 | #include <cstdio> |
| 28 | |
| 29 | void wsrep_ready_set (my_bool x); |
| 30 | |
| 31 | ssize_t wsrep_sst_prepare (void** msg); |
| 32 | wsrep_cb_status wsrep_sst_donate_cb (void* app_ctx, |
| 33 | void* recv_ctx, |
| 34 | const void* msg, size_t msg_len, |
| 35 | const wsrep_gtid_t* state_id, |
| 36 | const char* state, size_t state_len, |
| 37 | bool bypass); |
| 38 | |
| 39 | extern wsrep_uuid_t local_uuid; |
| 40 | extern wsrep_seqno_t local_seqno; |
| 41 | |
| 42 | // a helper function |
| 43 | bool wsrep_sst_received (wsrep_t* const wsrep, |
| 44 | const wsrep_uuid_t& uuid, |
| 45 | const wsrep_seqno_t seqno, |
| 46 | const void* const state, |
| 47 | const size_t state_len, |
| 48 | const bool implicit); |
| 49 | /*! SST thread signals init thread about sst completion */ |
| 50 | void wsrep_sst_complete(const wsrep_uuid_t*, wsrep_seqno_t, bool); |
| 51 | |
| 52 | void wsrep_notify_status (wsrep_member_status_t new_status, |
| 53 | const wsrep_view_info_t* view = 0); |
| 54 | |
| 55 | #endif /* WSREP_PRIV_H */ |
| 56 | |