1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

MCOL-520 - add in the mariadb upgrade code

This commit is contained in:
David Hill
2018-11-02 14:22:16 -05:00
parent 3e17f0ce5b
commit 1699f05ce6
2 changed files with 13 additions and 9 deletions

View File

@@ -97,14 +97,14 @@ if [ $module = "um" ]; then
sudo chown $user:$user -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1
fi
fi
fi
#setup rc.local
RCFILE=/etc/rc.d/rc.local
#setup rc.local
RCFILE=/etc/rc.d/rc.local
if [ $user != "root" ]; then
echo "uncomment runuser in rc.local, amazon AMI"
sudo sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1
if [ $user != "root" ]; then
echo "uncomment runuser in rc.local, amazon AMI"
sudo sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1
fi
fi
fi

View File

@@ -6589,11 +6589,15 @@ int ProcessMonitor::runUpgrade(std::string mysqlpw)
string tmpLog = tmpLogDir + "/mysql_upgrade.log";
string passwordOption = " --password=" + mysqlpw;
if ( mysqlpw == oam::UnassignedName )
passwordOption = "";
for ( int i = 0 ; i < 10 ; i++ )
{
//run upgrade script
string cmd = startup::StartUp::installDir() + "/mysql/bin/mysql_upgrade --defaults-file=" + startup::StartUp::installDir() + "/mysql/my.cnf --password=" +
mysqlpw + " > " + tmpLog + " 2>&1";
string cmd = startup::StartUp::installDir() + "/mysql/bin/mysql_upgrade --defaults-file=" + startup::StartUp::installDir() + "/mysql/my.cnf " +
passwordOption + " > " + tmpLog + " 2>&1";
int retCode = system(cmd.c_str());
if ( retCode == 0 ) {