Skip to content

Commit 3620910

Browse files
committed
cleanup: galera merge, simple changes
1 parent b04f848 commit 3620910

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+493
-700
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ scripts/mysqld_safe
106106
scripts/mysqldumpslow
107107
scripts/mysqlhotcopy
108108
scripts/mytop
109+
scripts/wsrep_sst_common
110+
scripts/wsrep_sst_mysqldump
111+
scripts/wsrep_sst_rsync
112+
scripts/wsrep_sst_xtrabackup
113+
scripts/wsrep_sst_xtrabackup-v2
109114
sql-bench/bench-count-distinct
110115
sql-bench/bench-init.pl
111116
sql-bench/compare-results
@@ -200,6 +205,8 @@ support-files/mysql.server
200205
support-files/mysql.spec
201206
support-files/mysqld_multi.server
202207
support-files/ndb-config-2-node.ini
208+
support-files/wsrep.cnf
209+
support-files/wsrep_notify
203210
tags
204211
tests/async_queries
205212
tests/bug25714

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,6 @@ ADD_SUBDIRECTORY(vio)
376376
ADD_SUBDIRECTORY(mysys)
377377
ADD_SUBDIRECTORY(mysys_ssl)
378378
ADD_SUBDIRECTORY(libmysql)
379-
IF(WITH_WSREP)
380-
ADD_SUBDIRECTORY(wsrep)
381-
ENDIF()
382379
ADD_SUBDIRECTORY(client)
383380
ADD_SUBDIRECTORY(extra)
384381
ADD_SUBDIRECTORY(libservices)
@@ -395,6 +392,10 @@ IF(NOT WITHOUT_SERVER)
395392
ADD_SUBDIRECTORY(libmysqld/examples)
396393
ENDIF(WITH_EMBEDDED_SERVER)
397394

395+
IF(WITH_WSREP)
396+
ADD_SUBDIRECTORY(wsrep)
397+
ENDIF()
398+
398399
ADD_SUBDIRECTORY(mysql-test)
399400
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
400401
ADD_SUBDIRECTORY(sql-bench)

client/client_priv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ enum options_client
9292
OPT_REPORT_PROGRESS,
9393
OPT_SKIP_ANNOTATE_ROWS_EVENTS,
9494
OPT_SSL_CRL, OPT_SSL_CRLPATH,
95-
OPT_GALERA_SST_MODE,
9695
OPT_MAX_CLIENT_OPTION /* should be always the last */
9796
};
9897

client/mysqldump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static struct my_option my_long_options[] =
347347
{"force", 'f', "Continue even if we get an SQL error.",
348348
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG,
349349
0, 0, 0, 0, 0, 0},
350-
{"galera-sst-mode", OPT_GALERA_SST_MODE,
350+
{"galera-sst-mode", 0,
351351
"This mode should normally be used in mysqldump snapshot state transfer "
352352
"(SST) in a Galera cluster. If enabled, mysqldump additionally dumps "
353353
"commands to turn off binary logging and SET global gtid_binlog_state "

cmake/cpack_rpm.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,13 @@ SETA(CPACK_RPM_test_PACKAGE_PROVIDES
149149

150150
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
151151
"${CPACK_RPM_PACKAGE_REQUIRES}"
152-
"MariaDB-client" "galera" "rsync" "lsof" "socat" "grep" "gawk" "iproute"
152+
"MariaDB-client")
153+
154+
IF(WITH_WSREP)
155+
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
156+
"galera" "rsync" "lsof" "socat" "grep" "gawk" "iproute"
153157
"coreutils" "findutils")
158+
ENDIF()
154159

155160
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
156161
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)

cmake/plugin.cmake

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,6 @@ MACRO(MYSQL_ADD_PLUGIN)
155155
ENDIF()
156156
ENDIF()
157157

158-
IF (WITH_WSREP)
159-
# Set compile definitions for non-embedded plugins
160-
LIST(APPEND wsrep_definitions "WITH_WSREP")
161-
LIST(APPEND wsrep_definitions "WSREP_PROC_INFO")
162-
SET_TARGET_PROPERTIES(${target} PROPERTIES
163-
COMPILE_DEFINITIONS "${wsrep_definitions}")
164-
ENDIF()
165-
166158
IF(ARG_STATIC_OUTPUT_NAME)
167159
SET_TARGET_PROPERTIES(${target} PROPERTIES
168160
OUTPUT_NAME ${ARG_STATIC_OUTPUT_NAME})
@@ -195,15 +187,8 @@ MACRO(MYSQL_ADD_PLUGIN)
195187
ADD_LIBRARY(${target} MODULE ${SOURCES})
196188
DTRACE_INSTRUMENT(${target})
197189

198-
LIST(APPEND dyn_compile_definitions "MYSQL_DYNAMIC_PLUGIN")
199-
200-
IF (WITH_WSREP)
201-
LIST(APPEND dyn_compile_definitions "WITH_WSREP")
202-
LIST(APPEND dyn_compile_definitions "WSREP_PROC_INFO")
203-
ENDIF()
204-
205190
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""
206-
COMPILE_DEFINITIONS "${dyn_compile_definitions}")
191+
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
207192

208193
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
209194

cmake/wsrep.cmake

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414
# along with this program; if not, write to the Free Software
1515
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616

17+
#
18+
# Galera library does not compile with windows
19+
#
20+
IF(UNIX)
21+
SET(with_wsrep_default ON)
22+
ELSE()
23+
SET(with_wsrep_default OFF)
24+
ENDIF()
25+
26+
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
27+
1728
# Set the patch version
1829
SET(WSREP_PATCH_VERSION "10")
1930

@@ -32,42 +43,14 @@ IF (DEFINED ENV{WSREP_REV})
3243
SET(WSREP_PATCH_REVNO $ENV{WSREP_REV})
3344
ENDIF()
3445

35-
# Obtain wsrep API version
36-
EXECUTE_PROCESS(
37-
COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2"
38-
OUTPUT_VARIABLE WSREP_API_VERSION
39-
RESULT_VARIABLE RESULT
40-
)
41-
#FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n")
42-
STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}")
46+
SET(WSREP_INTERFACE_VERSION 25)
4347

44-
IF(NOT WSREP_PATCH_REVNO)
45-
MESSAGE(WARNING "Could not determine bzr revision number, WSREP_VERSION will "
46-
"not contain the revision number.")
47-
SET(WSREP_VERSION
48-
"${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
49-
)
50-
ELSE()
51-
SET(WSREP_VERSION
52-
"${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}"
53-
)
54-
ENDIF()
48+
SET(WSREP_VERSION
49+
"${WSREP_INTERFACE_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}")
5550

56-
#
57-
# Galera library does not compile with windows and solaris
58-
#
59-
IF(UNIX)
60-
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ON)
61-
ELSE()
62-
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" OFF)
63-
ENDIF()
51+
SET(WSREP_PROC_INFO ${WITH_WSREP})
6452

65-
MACRO (BUILD_WITH_WSREP)
66-
SET(WSREP_C_FLAGS "-DWITH_WSREP -DWSREP_PROC_INFO -DMYSQL_MAX_VARIABLE_VALUE_LEN=2048")
67-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WSREP_C_FLAGS}")
68-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WSREP_C_FLAGS}")
53+
IF(WITH_WSREP)
6954
SET(COMPILATION_COMMENT "${COMPILATION_COMMENT}, wsrep_${WSREP_VERSION}")
70-
#SET(WITH_EMBEDDED_SERVER OFF CACHE INTERNAL "" FORCE)
71-
ENDMACRO()
55+
ENDIF()
7256

73-
#

config.h.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,12 @@
642642
#cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@
643643
#cmakedefine TIME_T_UNSIGNED @TIME_T_UNSIGNED@
644644

645+
#ifndef EMBEDDED_LIBRARY
646+
#cmakedefine WSREP_INTERFACE_VERSION "@WSREP_INTERFACE_VERSION@"
647+
#cmakedefine WITH_WSREP 1
648+
#cmakedefine WSREP_PROC_INFO 1
649+
#endif
650+
645651
#ifdef _AIX
646652
/*
647653
AIX includes inttypes.h from sys/types.h

debian/dist/Debian/control

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ Architecture: any
192192
Suggests: tinyca, mailx, mariadb-test
193193
Recommends: libhtml-template-perl
194194
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
195-
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version}), galera (>=25.2), rsync, lsof, socat, grep, gawk, iproute, coreutils, findutils
195+
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl,
196+
perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd,
197+
lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version}),
198+
galera (>=25.2), rsync, lsof, socat | netcat, grep, gawk, iproute,
199+
coreutils, findutils
196200
Provides: mariadb-server, mysql-server, virtual-mysql-server
197201
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
198202
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,

debian/dist/Ubuntu/control

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ Architecture: any
186186
Suggests: tinyca, mailx, mariadb-test
187187
Recommends: libhtml-template-perl
188188
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
189-
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version}), galera (>=25.2), rsync, lsof, socat, grep, gawk, iproute, coreutils, findutils
189+
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl,
190+
perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd,
191+
lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version}),
192+
galera (>=25.2), rsync, lsof, socat | netcat, grep, gawk, iproute,
193+
coreutils, findutils
190194
Provides: mariadb-server, mysql-server, virtual-mysql-server
191195
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
192196
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,

0 commit comments

Comments
 (0)