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
log_bin is missing from columnstore.cnf. This causes a search for the master log file to fail and replication doesn't apply. This patch adds a commented out log_bin which is enabled as needed. It also fixes an error message.
63 lines
1.6 KiB
Bash
Executable File
63 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# $Id$
|
|
#
|
|
# generic MariaDB Columnstore Command Line script.
|
|
#
|
|
# Notes: This script gets run by ProcMon during installs and upgrades:
|
|
|
|
# check log for error
|
|
checkForError() {
|
|
grep "ERROR 1045" ${tmpdir}/mariadb-command-line.log > ${tmpdir}/error.check
|
|
if [ `cat ${tmpdir}/error.check | wc -c` -ne 0 ]; then
|
|
echo "ERROR - PASSWORD: check log file: ${tmpdir}/mariadb-command-line.log"
|
|
rm -f ${tmpdir}/error.check
|
|
exit 2
|
|
fi
|
|
|
|
grep ERROR ${tmpdir}/mariadb-command-line.log > ${tmpdir}/error.check
|
|
if [ `cat ${tmpdir}/error.check | wc -c` -ne 0 ]; then
|
|
echo "ERROR: check log file: ${tmpdir}/mariadb-command-line.log"
|
|
rm -f ${tmpdir}/error.check
|
|
exit 1
|
|
fi
|
|
rm -f ${tmpdir}/error.check
|
|
}
|
|
|
|
pwprompt=
|
|
for arg in "$@"; do
|
|
if [ `expr -- "$arg" : '--command='` -eq 10 ]; then
|
|
command1="`echo $arg | awk -F= '{print $2}'`"
|
|
command2="`echo $arg | awk -F= '{print $3}'`"
|
|
command=$command1"="$command2
|
|
elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then
|
|
port="`echo $arg | awk -F= '{print $2}'`"
|
|
elif [ $(expr -- "$arg" : '--tmpdir=') -eq 9 ]; then
|
|
tmpdir="$(echo $arg | awk -F= '{print $2}')"
|
|
fi
|
|
done
|
|
|
|
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
|
|
|
|
|
>${tmpdir}/mariadb-command-line.log
|
|
|
|
#
|
|
# Run command
|
|
#
|
|
echo "Run command" >>${tmpdir}/mariadb-command-line.log
|
|
cat >${tmpdir}/mariadb-command-line.sql <<EOD
|
|
$command;
|
|
EOD
|
|
|
|
cat ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log
|
|
mysql \
|
|
--user=root \
|
|
calpontsys < ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log 2>&1
|
|
|
|
checkForError
|
|
|
|
#alls good, 'OK' for success
|
|
echo "OK"
|
|
exit 0
|