1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

MCOL-520. Fixed some stuff our older compilers don't like.

This commit is contained in:
Patrick LeBlanc
2018-10-08 15:32:10 -05:00
parent c798d464e0
commit d9aab31afd

View File

@@ -150,7 +150,7 @@ Oam::Oam()
} }
catch (...) {} // defaulted to false catch (...) {} // defaulted to false
} }
//get user //get user
string USER = "root"; string USER = "root";
char* p = getenv("USER"); char* p = getenv("USER");
@@ -162,7 +162,7 @@ Oam::Oam()
if ( USER != "root") if ( USER != "root")
userDir = "home/" + USER; userDir = "home/" + USER;
tmpdir = startup::StartUp::tmpDir(); tmpdir = startup::StartUp::tmpDir();
} }
@@ -7871,7 +7871,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
//get pid //get pid
cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp; cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp;
system(cmd.c_str()); system(cmd.c_str());
ifstream oldFile (pidtmp); ifstream oldFile(pidtmp.c_str());
//fail if file size 0 //fail if file size 0
oldFile.seekg(0, std::ios::end); oldFile.seekg(0, std::ios::end);
@@ -7930,7 +7930,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
//get pid //get pid
cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp; cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp;
system(cmd.c_str()); system(cmd.c_str());
ifstream oldFile (pidtmp); ifstream oldFile(pidtmp.c_str());
char line[400]; char line[400];
string pid; string pid;
@@ -7957,7 +7957,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
//check if pid has changed //check if pid has changed
cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp; cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp;
system(cmd.c_str()); system(cmd.c_str());
ifstream oldFile (pidtmp); ifstream oldFile(pidtmp.c_str());
char line[400]; char line[400];
string pid; string pid;
@@ -10886,17 +10886,17 @@ bool Oam::checkSystemRunning()
struct stat st; struct stat st;
string lockFileDir = "/var/subsys/lock"; string lockFileDir = "/var/subsys/lock";
try try
{ {
Config* sysConfig = Config::makeConfig(CalpontConfigFile.c_str()); Config* sysConfig = Config::makeConfig(CalpontConfigFile.c_str());
lockFileDir = sysConfig->getConfig("Installation", "LockFileDirectory"); lockFileDir = sysConfig->getConfig("Installation", "LockFileDirectory");
} }
catch (...) catch (...)
{} // defaulted to false {} // defaulted to false
string lockFile = lockFileDir + "/columnstore"; string lockFile = lockFileDir + "/columnstore";
if (stat(lockFile.c_str(), &st) == 0) if (stat(lockFile.c_str(), &st) == 0)
{ {
return true; return true;