1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge branch 'develop-1.1' into dev-merge-up-20180202

This commit is contained in:
Andrew Hutchings
2018-02-02 14:53:36 +00:00
77 changed files with 1371 additions and 2547 deletions

View File

@ -46,6 +46,7 @@
#include <csignal>
#include <sstream>
#include "columnstoreversion.h"
#include "ddlpkg.h"
#include "../../dbcon/dmlpackage/dmlpkg.h"
#define LIBOAM_DLLEXPORT
@ -154,84 +155,13 @@ Oam::~Oam()
/********************************************************************
*
* get System Software information
*
* (for backward compatibility only)
********************************************************************/
void Oam::getSystemSoftware(SystemSoftware& systemsoftware)
{
// parse releasenum file
string rn = InstallDir + "/releasenum";
ifstream File(rn.c_str());
if (!File)
// Open File error
return;
char line[400];
string buf;
while (File.getline(line, 400))
{
buf = line;
for ( unsigned int i = 0;; i++)
{
if ( SoftwareData[i] == "")
//end of list
break;
string data = "";
string::size_type pos = buf.find(SoftwareData[i], 0);
if (pos != string::npos)
{
string::size_type pos1 = buf.find("=", pos);
if (pos1 != string::npos)
{
data = buf.substr(pos1 + 1, 80);
}
else
// parse error
exceptionControl("getSystemSoftware", API_FAILURE);
//strip off any leading or trailing spaces
for (;;)
{
string::size_type pos = data.find(' ', 0);
if (pos == string::npos)
// no more found
break;
// strip leading
if (pos == 0)
{
data = data.substr(pos + 1, 10000);
}
else
{
// strip trailing
data = data.substr(0, pos);
}
}
switch (i)
{
case (0): // line up with SoftwareData[]
systemsoftware.Version = data;
break;
case (1):
systemsoftware.Release = data;
break;
}
}
} //end of for loop
} //end of while
File.close();
systemsoftware.Version = columnstore_version;
systemsoftware.Release = columnstore_release;
}
/********************************************************************
*
@ -2953,6 +2883,8 @@ oamModuleInfo_t Oam::getModuleInfo()
// Get Server Type Install ID
serverTypeInstall = atoi(sysConfig->getConfig("Installation", "ServerTypeInstall").c_str());
sysConfig;
}
catch (...) {}