You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-520 - changes for mysql_upgrade requiring password
This commit is contained in:
@ -15,6 +15,7 @@ rpmmode=install
|
||||
user=`whoami 2>/dev/null`
|
||||
quiet=0
|
||||
shiftcnt=0
|
||||
password=" "
|
||||
|
||||
for arg in "$@"; do
|
||||
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
|
||||
@ -40,6 +41,9 @@ for arg in "$@"; do
|
||||
elif [ $(expr -- "$arg" : '--module') -eq 8 ]; then
|
||||
module="$(echo $arg | awk -F= '{print $2}')"
|
||||
((shiftcnt++))
|
||||
elif [ $(expr -- "$arg" : '--password') -eq 10 ]; then
|
||||
password="$(echo $arg | awk -F= '{print $2}')"
|
||||
((shiftcnt++))
|
||||
fi
|
||||
done
|
||||
shift $shiftcnt
|
||||
@ -155,9 +159,15 @@ if [ $module = "um" ] || ( [ $module = "pm" ] && [ $PMwithUM = "y" ] ) || [ $Ser
|
||||
echo "ERROR: post-mysqld-install failed: check ${tmpDir}/post-mysqld-install.log"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Run post-mysql-install"
|
||||
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/post-mysql-install --installdir=$COLUMNSTORE_INSTALL_DIR --tmpdir=${tmpDir} > ${tmpDir}/post-mysql-install.log 2>&1
|
||||
mysqlPassword=" "
|
||||
if [[ $password != " " ]]; then
|
||||
mysqlPassword="--password="$password
|
||||
fi
|
||||
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/post-mysql-install --installdir=$COLUMNSTORE_INSTALL_DIR $mysqlPassword --tmpdir=${tmpDir} > ${tmpDir}/post-mysql-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: post-mysql-install failed: check ${tmpDir}/post-mysql-install.log"
|
||||
exit 1
|
||||
|
@ -283,7 +283,13 @@ void mysqlSetup()
|
||||
HOME = p;
|
||||
}
|
||||
|
||||
cmd = installDir + "/bin/post-mysql-install --installdir=" + installDir + " --tmpdir=" + tmpDir + " > " + tmpDir + "/post-mysql-install.log";
|
||||
string mysqlpw = oam.getMySQLPassword();
|
||||
|
||||
string passwordOption = "";
|
||||
if ( mysqlpw != oam::UnassignedName )
|
||||
passwordOption = " --password=" + mysqlpw;
|
||||
|
||||
cmd = installDir + "/bin/post-mysql-install --installdir=" + installDir + " --tmpdir=" + tmpDir + " " + passwordOption + " > " + tmpDir + "/post-mysql-install.log";
|
||||
rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) == 2)
|
||||
|
@ -243,8 +243,15 @@ int main(int argc, char** argv)
|
||||
|
||||
string modType = config.moduleType();
|
||||
|
||||
string mysqlpw = oam.getMySQLPassword();
|
||||
|
||||
string passwordOption = "";
|
||||
if ( mysqlpw != oam::UnassignedName )
|
||||
passwordOption = " --password=" + mysqlpw;
|
||||
|
||||
|
||||
//run the module install script
|
||||
string cmd = startup::StartUp::installDir() + "/bin/module_installer.sh " + " --installdir=" + startup::StartUp::installDir() + " --module=" + modType + " > " + tmpLogDir + "/module_installer.log 2>&1";
|
||||
string cmd = startup::StartUp::installDir() + "/bin/module_installer.sh " + " --installdir=" + startup::StartUp::installDir() + " --module=" + modType + " " + passwordOption + " > " + tmpLogDir + "/module_installer.log 2>&1";
|
||||
log.writeLog(__LINE__, "run module_installer.sh", LOG_TYPE_DEBUG);
|
||||
log.writeLog(__LINE__, cmd, LOG_TYPE_DEBUG);
|
||||
|
||||
|
@ -6588,7 +6588,7 @@ int ProcessMonitor::runUpgrade()
|
||||
|
||||
string mysqlpw = oam.getMySQLPassword();
|
||||
|
||||
string passwordOption = passwordOption = "";
|
||||
string passwordOption = "";
|
||||
if ( mysqlpw != oam::UnassignedName )
|
||||
passwordOption = " --password=" + mysqlpw;
|
||||
|
||||
|
Reference in New Issue
Block a user