summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Nozdrin <roman.nozdrin@mariadb.com>2020-06-18 06:10:25 +0000
committerOleksandr Byelkin <sanja@mariadb.com>2020-06-19 21:04:18 +0200
commit1e7a68f84a753bd708e719d664cd78f01f28f279 (patch)
treea903a6c77d6664685366f2d90d0ac604eb85bcea
parent070413fab327fe9c16e340d8335e26549dd91b08 (diff)
downloadmariadb-git-1e7a68f84a753bd708e719d664cd78f01f28f279.tar.gz
Both RPM and DEB now restart MDB uninstalling the plugin.
Both RPM and DEB now conflicts on previous versions of MCS. Trim .deb packaging. MCS now depends on python. Python version varies in distributions.
-rw-r--r--debian/control6
-rw-r--r--debian/mariadb-plugin-columnstore.install74
-rw-r--r--debian/mariadb-plugin-columnstore.postinst9
-rw-r--r--debian/mariadb-plugin-columnstore.postrm23
-rw-r--r--debian/mariadb-plugin-columnstore.prerm5
-rw-r--r--storage/columnstore/CMakeLists.txt29
m---------storage/columnstore/columnstore0
7 files changed, 91 insertions, 55 deletions
diff --git a/debian/control b/debian/control
index 65b67e64d9c..03a286ff739 100644
--- a/debian/control
+++ b/debian/control
@@ -657,9 +657,13 @@ Depends: mariadb-server-10.5 (= ${binary:Version}),
net-tools,
libsnappy1 | libsnappy1v5,
libjemalloc1 | libjemalloc2,
+ python | python2 | python3,
${misc:Depends},
${shlibs:Depends}
-Recommends: python-mysqldb
+Breaks: mariadb-columnstore-libs,
+ mariadb-columnstore-platform
+Replaces: mariadb-columnstore-libs,
+ mariadb-columnstore-platform
Description: MariaDB ColumnStore storage engine
The MariaDB ColumnStore storage engine is a high-performance columnar
analytical engine, aimed at rapid processing of analytical queries on very
diff --git a/debian/mariadb-plugin-columnstore.install b/debian/mariadb-plugin-columnstore.install
index dcd85a3c204..cd4461fe308 100644
--- a/debian/mariadb-plugin-columnstore.install
+++ b/debian/mariadb-plugin-columnstore.install
@@ -86,43 +86,43 @@ usr/bin/mcs-start-storagemanager.py
usr/bin/mcs-loadbrm.py
usr/bin/mariadb-columnstore-start.sh
usr/bin/mariadb-columnstore-stop.sh
-usr/lib/*-linux-gnu/libalarmmanager.so
-usr/lib/*-linux-gnu/libbatchloader.so
-usr/lib/*-linux-gnu/libbrm.so
-usr/lib/*-linux-gnu/libcacheutils.so
-usr/lib/*-linux-gnu/libcloudio.so
-usr/lib/*-linux-gnu/libcommon.so
-usr/lib/*-linux-gnu/libcompress.so
-usr/lib/*-linux-gnu/libconfigcpp.so
-usr/lib/*-linux-gnu/libdataconvert.so
-usr/lib/*-linux-gnu/libddlcleanuputil.so
-usr/lib/*-linux-gnu/libddlpackage.so
-usr/lib/*-linux-gnu/libddlpackageproc.so
-usr/lib/*-linux-gnu/libdmlpackage.so
-usr/lib/*-linux-gnu/libdmlpackageproc.so
-usr/lib/*-linux-gnu/libexecplan.so
-usr/lib/*-linux-gnu/libfuncexp.so
-usr/lib/*-linux-gnu/libidbdatafile.so
-usr/lib/*-linux-gnu/libjoblist.so
-usr/lib/*-linux-gnu/libjoiner.so
-usr/lib/*-linux-gnu/liblibmysql_client.so
-usr/lib/*-linux-gnu/libloggingcpp.so
-usr/lib/*-linux-gnu/libmarias3.so
-usr/lib/*-linux-gnu/libmessageqcpp.so
-usr/lib/*-linux-gnu/liboamcpp.so
-usr/lib/*-linux-gnu/libquerystats.so
-usr/lib/*-linux-gnu/libquerytele.so
-usr/lib/*-linux-gnu/libregr.so
-usr/lib/*-linux-gnu/librowgroup.so
-usr/lib/*-linux-gnu/librwlock.so
-usr/lib/*-linux-gnu/libstoragemanager.so
-usr/lib/*-linux-gnu/libthreadpool.so
-usr/lib/*-linux-gnu/libthrift.so
-usr/lib/*-linux-gnu/libudfsdk.so
-usr/lib/*-linux-gnu/libwindowfunction.so
-usr/lib/*-linux-gnu/libwriteengine.so
-usr/lib/*-linux-gnu/libwriteengineclient.so
-usr/lib/*-linux-gnu/libwriteengineredistribute.so
+usr/lib/*/libalarmmanager.so
+usr/lib/*/libbatchloader.so
+usr/lib/*/libbrm.so
+usr/lib/*/libcacheutils.so
+usr/lib/*/libcloudio.so
+usr/lib/*/libcommon.so
+usr/lib/*/libcompress.so
+usr/lib/*/libconfigcpp.so
+usr/lib/*/libdataconvert.so
+usr/lib/*/libddlcleanuputil.so
+usr/lib/*/libddlpackage.so
+usr/lib/*/libddlpackageproc.so
+usr/lib/*/libdmlpackage.so
+usr/lib/*/libdmlpackageproc.so
+usr/lib/*/libexecplan.so
+usr/lib/*/libfuncexp.so
+usr/lib/*/libidbdatafile.so
+usr/lib/*/libjoblist.so
+usr/lib/*/libjoiner.so
+usr/lib/*/liblibmysql_client.so
+usr/lib/*/libloggingcpp.so
+usr/lib/*/libmarias3.so
+usr/lib/*/libmessageqcpp.so
+usr/lib/*/liboamcpp.so
+usr/lib/*/libquerystats.so
+usr/lib/*/libquerytele.so
+usr/lib/*/libregr.so
+usr/lib/*/librowgroup.so
+usr/lib/*/librwlock.so
+usr/lib/*/libstoragemanager.so
+usr/lib/*/libthreadpool.so
+usr/lib/*/libthrift.so
+usr/lib/*/libudfsdk.so
+usr/lib/*/libwindowfunction.so
+usr/lib/*/libwriteengine.so
+usr/lib/*/libwriteengineclient.so
+usr/lib/*/libwriteengineredistribute.so
usr/lib/mysql/plugin/ha_columnstore.so
usr/lib/mysql/plugin/libregr_mysql.so
usr/lib/mysql/plugin/libudf_mysql.so
diff --git a/debian/mariadb-plugin-columnstore.postinst b/debian/mariadb-plugin-columnstore.postinst
index 06d6542527f..b482002c9dc 100644
--- a/debian/mariadb-plugin-columnstore.postinst
+++ b/debian/mariadb-plugin-columnstore.postinst
@@ -1,9 +1,10 @@
-#!/bin/bash -e
+#!/bin/bash
-rpmmode=install
+set -e
-columnstore-post-install --rpmmode=$rpmmode
+# Install ColumnStore
+columnstore-post-install --rpmmode=install
echo "MariaDB ColumnStore install completed"
-exit 0
+#DEBHELPER#
diff --git a/debian/mariadb-plugin-columnstore.postrm b/debian/mariadb-plugin-columnstore.postrm
index 6d8494fc0ba..cd8decbfe76 100644
--- a/debian/mariadb-plugin-columnstore.postrm
+++ b/debian/mariadb-plugin-columnstore.postrm
@@ -1,4 +1,6 @@
-#!/bin/bash -e
+#!/bin/bash
+
+set -e
if [ "$1" = "purge" ]; then
rm -rf /var/lib/columnstore
@@ -6,3 +8,22 @@ if [ "$1" = "purge" ]; then
rm -f /etc/mysql/mariadb.conf.d/columnstore.cnf.rpmsave
fi
+running_systemd() {
+ if [ "$(ps --no-headers -o comm 1)" = "systemd" ]; then
+ echo 0
+ else
+ echo 1
+ fi
+}
+
+if [ ! -z "$(pgrep -x mysqld)" ];then
+ systemctl cat mariadb.service > /dev/null 2>&1
+ if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
+ systemctl restart mariadb.service > /dev/null 2>&1
+ else
+ pkill mysqld > /dev/null 2>&1
+ /usr/bin/mysqld_safe &
+ fi
+fi
+
+#DEBHELPER#
diff --git a/debian/mariadb-plugin-columnstore.prerm b/debian/mariadb-plugin-columnstore.prerm
index 260f520783b..10e585a887b 100644
--- a/debian/mariadb-plugin-columnstore.prerm
+++ b/debian/mariadb-plugin-columnstore.prerm
@@ -1,6 +1,9 @@
-#!/bin/bash -e
+#!/bin/bash
+
+set -e
columnstore-pre-uninstall
exit 0
+#DEBHELPER#
diff --git a/storage/columnstore/CMakeLists.txt b/storage/columnstore/CMakeLists.txt
index 658b11a0b8b..f688c3040d4 100644
--- a/storage/columnstore/CMakeLists.txt
+++ b/storage/columnstore/CMakeLists.txt
@@ -12,16 +12,23 @@ CMAKE_SYSTEM_PROCESSOR STREQUAL "i686")
add_subdirectory(columnstore)
IF(TARGET columnstore)
- # Needed to bump the component changes up to the main scope
- SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE)
- IF (RPM)
- SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${CPACK_RPM_columnstore-engine_USER_FILELIST} PARENT_SCOPE)
- SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4" PARENT_SCOPE)
- SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
- SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
- SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE} PARENT_SCOPE)
- SET(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS thrift PARENT_SCOPE)
- ENDIF()
- INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
+ # Needed to bump the component changes up to the main scope
+ SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE)
+ IF (RPM)
+ SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${CPACK_RPM_columnstore-engine_USER_FILELIST} PARENT_SCOPE)
+ # To untie the python mess across distributions MCS supports.
+ IF(RPM MATCHES "(rhel|centos)8|(sles|suse)15|fedora")
+ SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python3" PARENT_SCOPE)
+ ELSEIF(RPM MATCHES "(centos|rhel)7")
+ SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python" PARENT_SCOPE)
+ ELSE()
+ SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python or python2 or python3" PARENT_SCOPE)
+ ENDIF()
+ SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
+ SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
+ SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE} PARENT_SCOPE)
+ SET(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS "thrift, MariaDB-columnstore-engine, MariaDB-columnstore-platform, MariaDB-columnstore-libs" PARENT_SCOPE)
+ ENDIF()
+ INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
ENDIF()
ENDIF()
diff --git a/storage/columnstore/columnstore b/storage/columnstore/columnstore
-Subproject 3cfbda3ad30cd9c759f5a24dd8be66586faa56d
+Subproject 0cd56e7d01ec952fbe05f2c462cc59a80b88a30