summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-06-29 15:28:20 +0300
committerSergei Krivonos <sergei.krivonos@mariadb.com>2021-11-09 17:04:49 +0200
commitc1e1ca20f48b30c8a754bd42274385065d89060e (patch)
treebfdee17c8b191d96966d5dd8572fa0c281b6a001 /sql
parent009f3e06f3e74303559df59db404b300a12241d3 (diff)
downloadmariadb-git-c1e1ca20f48b30c8a754bd42274385065d89060e.tar.gz
In case WITH_WSREP is enabled, build wsrep as plugin
If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc ยด Allow static plugins to export symbols (on Unix) wsrep_info relies on wsrep defined symbols (e.g LOCK_wsrep_config_state) exported from mysqld
Diffstat (limited to 'sql')
-rw-r--r--sql/CMakeLists.txt9
-rw-r--r--sql/sql_builtin.cc.in6
2 files changed, 4 insertions, 11 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 4dd34e80f2d..5f6ccddfe16 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -36,9 +36,10 @@ IF(WITH_WSREP AND NOT EMBEDDED_LIBRARY)
wsrep_plugin.cc
service_wsrep.cc
)
- SET(WSREP_LIB wsrep-lib wsrep_api_v26)
+ MYSQL_ADD_PLUGIN(wsrep ${WSREP_SOURCES} MANDATORY NOT_EMBEDDED EXPORT_SYMBOLS LINK_LIBRARIES wsrep-lib wsrep_api_v26)
ELSE()
- SET(WSREP_SOURCES wsrep_dummy.cc)
+ ADD_LIBRARY(wsrep STATIC wsrep_dummy.cc)
+ ADD_DEPENDENCIES(wsrep GenError)
ENDIF()
INCLUDE_DIRECTORIES(
@@ -142,7 +143,6 @@ SET (SQL_SOURCE
opt_split.cc
rowid_filter.cc rowid_filter.h
opt_trace.cc
- ${WSREP_SOURCES}
table_cache.cc encryption.cc temporary_tables.cc
proxy_protocol.cc backup.cc xa.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
@@ -180,11 +180,10 @@ DTRACE_INSTRUMENT(sql)
TARGET_LINK_LIBRARIES(sql
mysys mysys_ssl dbug strings vio pcre
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}
- ${WSREP_LIB}
${SSL_LIBRARIES}
${LIBSYSTEMD})
-FOREACH(se aria partition perfschema sql_sequence)
+FOREACH(se aria partition perfschema sql_sequence wsrep)
# These engines are used directly in sql sources.
IF(TARGET ${se})
TARGET_LINK_LIBRARIES(sql ${se})
diff --git a/sql/sql_builtin.cc.in b/sql/sql_builtin.cc.in
index 5ac044afd5d..810f98a876c 100644
--- a/sql/sql_builtin.cc.in
+++ b/sql/sql_builtin.cc.in
@@ -32,9 +32,6 @@ extern
builtin_maria_plugin
@mysql_mandatory_plugins@ @mysql_optional_plugins@
builtin_maria_binlog_plugin,
-#ifdef WITH_WSREP
- builtin_maria_wsrep_plugin,
-#endif /* WITH_WSREP */
builtin_maria_mysql_password_plugin;
struct st_maria_plugin *mysql_optional_plugins[]=
@@ -45,8 +42,5 @@ struct st_maria_plugin *mysql_optional_plugins[]=
struct st_maria_plugin *mysql_mandatory_plugins[]=
{
builtin_maria_binlog_plugin, builtin_maria_mysql_password_plugin,
-#ifdef WITH_WSREP
- builtin_maria_wsrep_plugin,
-#endif /* WITH_WSREP */
@mysql_mandatory_plugins@ 0
};