1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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

@ -449,14 +449,17 @@ void WESplitterApp::invokeCpimport()
std::vector<char*> Cmds;
char* ptr = 0;
std::istringstream ss(aCmdLineStr);
std::string arg;
std::vector<std::string> v2;
std::vector<std::string> v2(20, "");
while(ss >> arg)
{
//we need something that works on Windows as well as linux
char* ptr = 0;
v2.push_back(arg);
}
for (unsigned int i = 0; i < v2.size(); ++i)
{
//we're going to exec() below, so don't worry about freeing
ptr = strdup(v2.back().c_str());
Cmds.push_back(ptr);