You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-20 01:42:27 +03:00
ColumnStore now uses standard bin/lib paths for pretty much everything. Data path is now hard-coded to /var/lib/columnstore. This patch also: * Removes v1 decompression * Removes a bunch of unneeded files * Removes COLUMNSTORE_INSTALL_DIR / $INSTALLDIR * Makes my.cnf.d work for all platforms (MCOL-3558) * Changes configcpp to use recursive mutex (fixes possible config write deadlock) * Fixes MCOL-3599 Fix regr functions, The library was installed in the wrong location * Fixes a bunch of Ubuntu packaging issues * Changes the binary names of several of the executables so as not to clash with potential executables from other packages
67 lines
1.5 KiB
Bash
67 lines
1.5 KiB
Bash
#!/bin/bash
|
|
#
|
|
# $Id$
|
|
#
|
|
# generic MariaDB Columnstore Disable Replication script.
|
|
#
|
|
# Notes: This script gets run by ProcMon:
|
|
|
|
# check log for error
|
|
checkForError() {
|
|
grep ERROR ${tmpdir}/disable-rep-status.log > ${tmpdir}/error.check
|
|
if [ `cat ${tmpdir}/error.check | wc -c` -ne 0 ]; then
|
|
echo "ERROR: check log file:${tmpdir}/disable-rep-status.log"
|
|
rm -f ${tmpdir}/error.check
|
|
exit 1
|
|
fi
|
|
rm -f ${tmpdir}/error.check
|
|
}
|
|
|
|
pwprompt=
|
|
for arg in "$@"; do
|
|
if [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
|
password="`echo $arg | awk -F= '{print $2}'`"
|
|
pwprompt="--password=$password"
|
|
elif [ $(expr -- "$arg" : '--tmpdir=') -eq 9 ]; then
|
|
tmpdir="$(echo $arg | awk -F= '{print $2}')"
|
|
fi
|
|
done
|
|
|
|
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
|
|
|
>${tmpdir}/disable-rep-status.log
|
|
|
|
#
|
|
# Run stop slave command
|
|
#
|
|
echo "Run stop slave command" >>${tmpdir}/disable-rep-status.log
|
|
cat >${tmpdir}/idb_disable-rep.sql <<EOD
|
|
stop slave;
|
|
EOD
|
|
|
|
cat ${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log
|
|
mysql \
|
|
--user=root $pwprompt \
|
|
calpontsys <${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log 2>&1
|
|
|
|
checkForError
|
|
|
|
#
|
|
# Run reset slave command
|
|
#
|
|
echo "Run reset slave command" >>${tmpdir}/disable-rep-status.log
|
|
cat >${tmpdir}/idb_disable-rep.sql <<EOD
|
|
reset slave;
|
|
EOD
|
|
|
|
cat ${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log
|
|
mysql \
|
|
--user=root $pwprompt \
|
|
calpontsys <${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log 2>&1
|
|
|
|
checkForError
|
|
|
|
#alls good, 'OK' for success
|
|
echo "OK"
|
|
exit 0
|