1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge branch 'develop' into mcol-3743

This commit is contained in:
Patrick LeBlanc
2020-04-13 12:49:28 -05:00
committed by GitHub
24 changed files with 442 additions and 202 deletions

View File

@ -4,6 +4,15 @@
#
# pre-uninstall steps for columnstore install
running_systemd() {
if [ "$(ps --no-headers -o comm 1)" == "systemd" ]; then
echo 0
else
echo 1
fi
}
rpmmode=install
user=`whoami 2>/dev/null`
@ -28,7 +37,7 @@ columnstore stop > /dev/null 2>&1
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl stop mariadb.service > /dev/null 2>&1
else
pkill mysqld

View File

@ -17,6 +17,14 @@
# Short-Description: Start/stop MariaDB Columnstore DW DBMS
### END INIT INFO
running_systemd() {
if [ "$(ps --no-headers -o comm 1)" == "systemd" ]; then
echo 0
else
echo 1
fi
}
USER=`whoami 2>/dev/null`
# Source function library.
@ -95,7 +103,7 @@ stop() {
fuser -k 8604/tcp > /dev/null 2>&1
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl stop mariadb.service > /dev/null 2>&1
else
pkill mysqld

View File

@ -4,6 +4,15 @@
#
# Post-install steps for calpont-mysql install
# check if running systemd
running_systemd() {
if [ "$(ps --no-headers -o comm 1)" == "systemd" ]; then
echo 0
else
echo 1
fi
}
# check log for error
checkForError() {
# check for password error
@ -13,7 +22,7 @@ checkForError() {
rm -f ${tmpdir}/error.check
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl stop mariadb.service > /dev/null 2>&1
else
pkill mysqld
@ -62,7 +71,7 @@ done
# Restart in the same way that mysqld will be started normally.
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl stop mariadb.service > /dev/null 2>&1
else
pkill mysqld
@ -71,7 +80,7 @@ sleep 2
export MYSQL_OPTS="--skip-grant-tables"
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl start mariadb.service
else
/usr/bin/mysqld_safe --skip-grant-tables &
@ -87,7 +96,7 @@ if [ $? -ne 0 ]; then
echo "ERROR: Invalid password in .my.cnf, or Columnstore plugin install missing"
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl stop mariadb.service > /dev/null 2>&1
else
pkill mysqld
@ -98,7 +107,7 @@ fi
# Test we are using systemd
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl stop mariadb.service > /dev/null 2>&1
else
pkill mysqld