You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-520 - move mysql_upgrade
This commit is contained in:
@@ -44,7 +44,6 @@ checkForError() {
|
|||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
installdir=$prefix/mariadb/columnstore
|
installdir=$prefix/mariadb/columnstore
|
||||||
rpmmode=install
|
rpmmode=install
|
||||||
password=" "
|
|
||||||
tmpdir="/tmp"
|
tmpdir="/tmp"
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
@@ -105,27 +104,6 @@ if [ -x $installdir/mysql/mysql-Columnstore ]; then
|
|||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Run MariaDB (mysql) upgrade script, if it exist
|
|
||||||
if [ -x $installdir/mysql/bin/mysql_upgrade ]; then
|
|
||||||
if [[ ${password} == " " ]]; then
|
|
||||||
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf > $tmpdir/mysql_upgrade.log
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
|
|
||||||
$installdir/mysql/mysql-Columnstore stop
|
|
||||||
sleep 2
|
|
||||||
exit 2;
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf --password=$password > $tmpdir/mysql_upgrade.log
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
|
|
||||||
$installdir/mysql/mysql-Columnstore stop
|
|
||||||
sleep 2
|
|
||||||
exit 2;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install various Calpont stuff...
|
# Install various Calpont stuff...
|
||||||
$installdir/mysql/install_calpont_mysql.sh --installdir=$installdir --tmpdir=$tmpdir
|
$installdir/mysql/install_calpont_mysql.sh --installdir=$installdir --tmpdir=$tmpdir
|
||||||
checkForError
|
checkForError
|
||||||
|
@@ -77,38 +77,43 @@ fi
|
|||||||
# InfiniDB testing hook...
|
# InfiniDB testing hook...
|
||||||
test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql
|
test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql
|
||||||
|
|
||||||
if [ -x $installdir/mysql/mysql-Columnstore ]; then
|
# If DB exist, run upgrade script if it exist
|
||||||
# Restart in the same way that mysqld will be started normally.
|
if [ -d $installdir/mysql/db/calpontsys ]; then
|
||||||
$installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1
|
|
||||||
sleep 2
|
|
||||||
$installdir/mysql/mysql-Columnstore start
|
|
||||||
|
|
||||||
sleep 5
|
if [ -x $installdir/mysql/mysql-Columnstore ]; then
|
||||||
|
# Restart in the same way that mysqld will be started normally.
|
||||||
# Run MariaDB (mysql) upgrade script, if it exist
|
$installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1
|
||||||
if [ -x $installdir/mysql/bin/mysql_upgrade ]; then
|
sleep 2
|
||||||
if [[ ${password} == " " ]]; then
|
$installdir/mysql/mysql-Columnstore start
|
||||||
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf > $tmpdir/mysql_upgrade.log
|
|
||||||
if [ $? -ne 0 ]; then
|
sleep 5
|
||||||
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
|
|
||||||
$installdir/mysql/mysql-Columnstore stop
|
# Run MariaDB (mysql) upgrade script, if it exist
|
||||||
sleep 2
|
if [ -x $installdir/mysql/bin/mysql_upgrade ]; then
|
||||||
exit 2;
|
echo "Running mysql_upgrade script"
|
||||||
fi
|
if [[ ${password} == " " ]]; then
|
||||||
else
|
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf > $tmpdir/mysql_upgrade.log
|
||||||
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf --password=$password > $tmpdir/mysql_upgrade.log
|
if [ $? -ne 0 ]; then
|
||||||
if [ $? -ne 0 ]; then
|
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
|
||||||
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
|
$installdir/mysql/mysql-Columnstore stop
|
||||||
$installdir/mysql/mysql-Columnstore stop
|
sleep 2
|
||||||
sleep 2
|
exit 2;
|
||||||
exit 2;
|
fi
|
||||||
|
else
|
||||||
|
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf --password=$password > $tmpdir/mysql_upgrade.log
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
|
||||||
|
$installdir/mysql/mysql-Columnstore stop
|
||||||
|
sleep 2
|
||||||
|
exit 2;
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# stop
|
||||||
|
$installdir/mysql/mysql-Columnstore stop
|
||||||
|
sleep 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# stop
|
|
||||||
$installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1
|
|
||||||
sleep 2
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Don't give the user the notes, we'll fix them ourselves...
|
### Don't give the user the notes, we'll fix them ourselves...
|
||||||
|
Reference in New Issue
Block a user