Reduce compilation dependencies on wsrep_mysqld.h

Making changes to wsrep_mysqld.h causes large parts of server code to
be recompiled. The reason is that wsrep_mysqld.h is included by
sql_class.h, even tough very little of wsrep_mysqld.h is needed in
sql_class.h. This commit introduces a new header file, wsrep_on.h,
which is meant to be included from sql_class.h, and contains only
macros and variable declarations used to determine whether wsrep is
enabled.
Also, header wsrep.h should only contain definitions that are also
used outside of sql/. Therefore, move WSREP_TO_ISOLATION* and
WSREP_SYNC_WAIT macros to wsrep_mysqld.h.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
Daniele Sciascia
2022-02-15 14:36:02 +01:00
committed by Jan Lindström
parent cf1a944f5b
commit 2917bd0d2c
40 changed files with 189 additions and 132 deletions

View File

@ -19,13 +19,8 @@
#ifndef WSREP_PRIV_H
#define WSREP_PRIV_H
#include <my_global.h>
#include "wsrep_mysqld.h"
#include "wsrep_schema.h"
#include <log.h>
#include <pthread.h>
#include <cstdio>
#include "wsrep_api.h"
#include "wsrep/server_state.hpp"
my_bool wsrep_ready_set (my_bool x);
@ -39,7 +34,6 @@ wsrep_cb_status wsrep_sst_donate_cb (void* app_ctx,
extern wsrep_uuid_t local_uuid;
extern wsrep_seqno_t local_seqno;
extern Wsrep_schema* wsrep_schema;
// a helper function
bool wsrep_sst_received(THD*, const wsrep_uuid_t&, wsrep_seqno_t,