From 2917bd0d2cf417cbf9c83b64ae2b7806bdb2f34e Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Tue, 15 Feb 2022 14:36:02 +0100 Subject: Reduce compilation dependencies on wsrep_mysqld.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- sql/log_event.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/log_event.cc') diff --git a/sql/log_event.cc b/sql/log_event.cc index de929330f2a..0749bc1ec0d 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -43,8 +43,10 @@ #include #include #include "compat56.h" -#include "wsrep_mysqld.h" #include "sql_insert.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ #else #include "mysqld_error.h" #endif /* MYSQL_CLIENT */ -- cgit v1.2.1