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

MCOL-3606 Make ColumnStore use generic paths

ColumnStore now uses standard bin/lib paths for pretty much everything.
Data path is now hard-coded to /var/lib/columnstore.

This patch also:

* Removes v1 decompression
* Removes a bunch of unneeded files
* Removes COLUMNSTORE_INSTALL_DIR / $INSTALLDIR
* Makes my.cnf.d work for all platforms (MCOL-3558)
* Changes configcpp to use recursive mutex (fixes possible config write deadlock)
* Fixes MCOL-3599 Fix regr functions, The library was installed in the wrong location
* Fixes a bunch of Ubuntu packaging issues
* Changes the binary names of several of the executables so as not to
clash with potential executables from other packages
This commit is contained in:
Andrew Hutchings
2019-11-04 11:06:33 +00:00
parent dea1dec507
commit 8ab9ebb0f4
178 changed files with 1310 additions and 18366 deletions

View File

@ -286,7 +286,7 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
for (int i = aStartFD; i < aEndFD; i++) close(i);
errno = 0;
int aRet = execv(Cmds[0], &Cmds[0]); //NOTE - works with full Path
int aRet = execvp(Cmds[0], &Cmds[0]); //NOTE - works with full Path
//int aRet = execvp(Cmds[0], &Cmds[0]); //NOTE - works if $PATH has cpimport
int execvErrno = errno;
@ -563,85 +563,6 @@ void WEDataLoader::str2Argv(std::string CmdLine, std::vector<char*>& V)
V.push_back(0); //null terminate
}
//-----------------------------------------------------------------------------
/**
*
* @brief Include the absolute path to prgm name, which is
* @brief the first element in the vector
* @param V vector which contains each element of argv
*
**/
std::string WEDataLoader::getCalpontHome()
{
string calpontDir = config::Config::makeConfig()->getConfig(
"SystemConfig", "CalpontHome");
if (0 == calpontDir.length())
{
calpontDir = startup::StartUp::installDir() + "/bin";
}
else
{
calpontDir += "/bin";
}
return calpontDir;
}
//-----------------------------------------------------------------------------
/**
*
* @brief Include the absolute path to prgm name, which is
* @brief the first element in the vector
* @param V vector which contains each element of argv
*
**/
std::string WEDataLoader::getPrgmPath(std::string& PrgmName)
{
std::string cpimportPath = getCalpontHome();
cpimportPath += "/";
cpimportPath += PrgmName;
return cpimportPath;
}
//-----------------------------------------------------------------------------
/**
*
* @brief Include the absolute path to prgm name, which is
* @brief the first element in the vector
* @param V vector which contains each element of argv
*
**/
void WEDataLoader::updateCmdLineWithPath(string& CmdLine)
{
std::istringstream iSs(CmdLine);
std::ostringstream oSs;
std::string aArg;
int aCount = 0;
while (iSs >> aArg)
{
if (0 == aCount)
{
string aPrgmPath = getPrgmPath(aArg);
oSs << aPrgmPath;
}
else
{
oSs << " ";
oSs << aArg;
}
++aCount;
}
CmdLine = oSs.str();
}
//-----------------------------------------------------------------------------
/**
*
@ -1207,8 +1128,6 @@ void WEDataLoader::onReceiveCmdLineArgs(ByteStream& Ibs)
{
Ibs >> fCmdLineStr;
cout << "CMD LINE ARGS came in " << fCmdLineStr << endl;
updateCmdLineWithPath(fCmdLineStr);
cout << "Updated CmdLine : " << fCmdLineStr << endl;
if (fpSysLog)
{

View File

@ -65,9 +65,6 @@ public:
void pushData2Cpimport(ByteStream& Ibs); // push data to cpimport from the queue
void closeWritePipe();
void str2Argv(std::string CmdLine, std::vector<char*>& V);
std::string getCalpontHome();
std::string getPrgmPath(std::string& PrgmName);
void updateCmdLineWithPath(std::string& CmdLine);
public: