1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-06-12 05:01:56 +03:00

MCOL-5 Building the cpimport command line for LDI relied on the addresses of the contents of a std:vector being static during re-allocation. This is an erroneous assumption. Recoded to build the vector completely, then use it.

This commit is contained in:
David Hall
2016-08-05 14:09:19 -05:00
parent 0d2b69c031
commit 7598e8bc75
3 changed files with 17 additions and 8 deletions

View File

@ -25,6 +25,7 @@
* Author: Boby Paul: bpaul@calpont.com
*/
#include "config.h" // Used to pickup STRERROR_R_CHAR_P definition
#include <cstdlib>
#include <csignal>
@ -71,7 +72,6 @@ using namespace messageqcpp;
#include "we_cleartablelockcmd.h"
#include "we_dataloader.h"
#include "we_readthread.h"
#include "config.h" // Used to pickup STRERROR_R_CHAR_P definition
#include "installdir.h"
@ -247,11 +247,14 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
std::string aCmdLine = fCmdLineStr;
std::istringstream ss(aCmdLine);
std::string arg;
std::vector<std::string> v2;
std::vector<std::string> v2(20, "");
while (ss >> arg)
{
v2.push_back(arg);
Cmds.push_back(const_cast<char*>(v2.back().c_str()));
}
for (unsigned int i = 0; i < v2.size(); ++i)
{
Cmds.push_back(const_cast<char*>(v2[i].c_str()));
}
Cmds.push_back(0); //null terminate