From b090339cab7645187d2534e355b34a2059c8ba9b Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 6 Nov 2018 16:58:33 -0600 Subject: [PATCH] MCOL-520 - move mysql_upgrade --- oam/install_scripts/module_installer.sh | 2 +- oam/install_scripts/post-mysql-install | 2 ++ oam/install_scripts/post-mysqld-install | 3 +++ oamapps/postConfigure/helpers.cpp | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/oam/install_scripts/module_installer.sh b/oam/install_scripts/module_installer.sh index 0f8d6ba14..038611675 100755 --- a/oam/install_scripts/module_installer.sh +++ b/oam/install_scripts/module_installer.sh @@ -160,7 +160,7 @@ if [ $module = "um" ] || ( [ $module = "pm" ] && [ $PMwithUM = "y" ] ) || [ $Ser fi echo "Run post-mysqld-install" - $COLUMNSTORE_INSTALL_DIR/bin/post-mysqld-install --installdir=$COLUMNSTORE_INSTALL_DIR $mysqlPassword > ${tmpDir}/post-mysqld-install.log 2>&1 + $COLUMNSTORE_INSTALL_DIR/bin/post-mysqld-install --installdir=$COLUMNSTORE_INSTALL_DIR $mysqlPassword --tmpdir=${tmpDir} > ${tmpDir}/post-mysqld-install.log 2>&1 if [ $? -ne 0 ]; then echo "ERROR: post-mysqld-install failed: check ${tmpDir}/post-mysqld-install.log" exit 1 diff --git a/oam/install_scripts/post-mysql-install b/oam/install_scripts/post-mysql-install index 8a4c0291d..57e950f68 100755 --- a/oam/install_scripts/post-mysql-install +++ b/oam/install_scripts/post-mysql-install @@ -45,6 +45,8 @@ prefix=/usr/local installdir=$prefix/mariadb/columnstore rpmmode=install password=" " +tmpdir="/tmp" + for arg in "$@"; do if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then prefix="$(echo $arg | awk -F= '{print $2}')" diff --git a/oam/install_scripts/post-mysqld-install b/oam/install_scripts/post-mysqld-install index 27eba3d42..3976c5466 100755 --- a/oam/install_scripts/post-mysqld-install +++ b/oam/install_scripts/post-mysqld-install @@ -8,6 +8,7 @@ prefix=/usr/local installdir=$prefix/mariadb/columnstore rpmmode=install user=mysql +tmpdir="/tmp" password=" " pwprompt= @@ -30,6 +31,8 @@ for arg in "$@"; do user="`echo $arg | awk -F= '{print $2}'`" elif [ $(expr -- "$arg" : '--password=') -eq 11 ]; then password="$(echo $arg | awk -F= '{print $2}')" + elif [ $(expr -- "$arg" : '--tmpdir=') -eq 9 ]; then + tmpdir="$(echo $arg | awk -F= '{print $2}')" else echo "post-mysqld-install: ignoring unknown argument: $arg" 1>&2 fi diff --git a/oamapps/postConfigure/helpers.cpp b/oamapps/postConfigure/helpers.cpp index deedd4c60..3238f9c57 100644 --- a/oamapps/postConfigure/helpers.cpp +++ b/oamapps/postConfigure/helpers.cpp @@ -260,7 +260,7 @@ void mysqlSetup() if ( mysqlpw != oam::UnassignedName ) passwordOption = " --password=" + mysqlpw; - cmd = installDir + "/bin/post-mysqld-install --installdir=" + installDir + " " + passwordOption + " > " + tmpDir + "/post-mysqld-install.log 2>&1"; + cmd = installDir + "/bin/post-mysqld-install --installdir=" + installDir + " " + passwordOption + " --tmpdir=" + tmpDir + " > " + tmpDir + "/post-mysqld-install.log 2>&1"; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0)