1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-15505 Fixes to compilation without -DWITH_WSREP:BOOL=ON

Removed including wsrep_api.h from service_wsrep.h. This caused
various kinds of collisions with definitions when wsrep is
not supposed to be built in. Defined functions wsrep_xid_seqno()
and wsrep_xid_uuid() in wsrep_dummy.cc. Replaced wsrep_seqno_t
with long long where wsrep_api.h is not included.

Removed wsrep_xid_seqno() macro from wsrep_mysqld.h and made
wsrep code using wsrep_xid_seqno() in handler.cc to be compiled
in only if WITH_WSREP is ON.

Included wsrep_api.h for mariabackup if WITH_WSREP is ON.
This commit is contained in:
Teemu Ollakka
2018-03-21 12:02:09 +02:00
parent b125ae0a84
commit 33aad1d273
9 changed files with 30 additions and 14 deletions

View File

@@ -22,8 +22,6 @@
For engines that want to support galera.
*/
#include <wsrep_api.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -69,7 +67,9 @@ enum wsrep_trx_status {
};
struct xid_t;
struct wsrep;
struct wsrep_ws_handle;
struct wsrep_buf;
extern struct wsrep_service_st {
struct wsrep * (*get_wsrep_func)();
@@ -84,7 +84,7 @@ extern struct wsrep_service_st {
void (*wsrep_aborting_thd_enqueue_func)(THD *thd);
bool (*wsrep_consistency_check_func)(THD *thd);
int (*wsrep_is_wsrep_xid_func)(const struct xid_t *xid);
wsrep_seqno_t (*wsrep_xid_seqno_func)(const struct xid_t *xid);
long long (*wsrep_xid_seqno_func)(const struct xid_t *xid);
const unsigned char* (*wsrep_xid_uuid_func)(const struct xid_t *xid);
void (*wsrep_lock_rollback_func)();
int (*wsrep_on_func)(MYSQL_THD);
@@ -186,7 +186,7 @@ enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd);
enum wsrep_query_state wsrep_thd_query_state(THD *thd);
enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, bool all);
int wsrep_is_wsrep_xid(const struct xid_t* xid);
wsrep_seqno_t wsrep_xid_seqno(const struct xid_t* xid);
long long wsrep_xid_seqno(const struct xid_t* xid);
const unsigned char* wsrep_xid_uuid(const struct xid_t* xid);
int wsrep_on(MYSQL_THD thd);
int wsrep_thd_retry_counter(THD *thd);