Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO-4256 : Set Galera library as submodule for MariaDB server #346

Open
wants to merge 1 commit into
base: 10.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
[submodule "extra/wolfssl/wolfssl"]
path = extra/wolfssl/wolfssl
url = https://github.com/wolfSSL/wolfssl.git
[submodule "plugin/galera_replication/galera"]
path = plugin/galera_replication/galera
url = [email protected]:MariaDB/galera.git
branch = mariadb-4.x
1 change: 1 addition & 0 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,7 @@ ()

for (<$bindir/storage/*$multiconfig/*.so>,
<$bindir/plugin/*$multiconfig/*.so>,
<$bindir/plugin/galera_replication/galera/*.so>,
<$bindir/libmariadb/plugins/*/*.so>,
<$bindir/libmariadb/$multiconfig/*.so>,
<$bindir/sql$multiconfig/*.so>)
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/wsrep/common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ sub check_wsrep_support() {
# WSREP_PROVIDER env not defined. Lets try to locate the wsrep provider
# library.
$file_wsrep_provider=
::mtr_file_exists("/usr/lib64/galera-4/libgalera_smm.so",
::mtr_file_exists("$basedir/lib/plugin/libgalera_smm.so",
"$::bindir/plugin/galera_replication/galera/libgalera_smm.so",
"/usr/lib64/galera-4/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so",
"/usr/lib/galera-4/libgalera_smm.so",
"/usr/lib/galera/libgalera_smm.so");
Expand Down
50 changes: 50 additions & 0 deletions plugin/galera_replication/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (C) 2023 Codership Oy <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

OPTION(WITH_WSREP "Build Galera library" OFF)

MESSAGE(STATUS "Building with Galera ${WITH_WSREP}")

IF(NOT WITH_WSREP)
RETURN()
ENDIF()

IF (WITH_WSREP)

IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugin/galera_replication/galera/GALERA_VERSION")
MESSAGE(FATAL_ERROR "No MariaDB galera library code! Run
${GIT_EXECUTABLE} submodule update --init --recursive
Then restart the build.
")
ENDIF()

ADD_SUBDIRECTORY(galera)

INSTALL(FILES
"${CMAKE_CURRENT_BINARY_DIR}/galera/libgalera_smm.so"
DESTINATION ${INSTALL_PLUGINDIR}
COMPONENT Server)
INSTALL(PROGRAMS
"${CMAKE_CURRENT_BINARY_DIR}/galera/garb/garbd"
DESTINATION ${INSTALL_BINDIR}
COMPONENT Server)
ENDIF()
1 change: 1 addition & 0 deletions plugin/galera_replication/galera
Submodule galera added at e046cc