You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-5 fill the vector before taking the addresses of the strings.
This commit is contained in:
@ -3456,11 +3456,12 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
std::istringstream ss(aCmdLine);
|
std::istringstream ss(aCmdLine);
|
||||||
std::string arg;
|
std::string arg;
|
||||||
std::vector<std::string> v2(20, "");
|
std::vector<std::string> v2(20, "");
|
||||||
|
unsigned int i = 0;
|
||||||
while (ss >> arg)
|
while (ss >> arg)
|
||||||
{
|
{
|
||||||
v2.push_back(arg);
|
v2[i++] = arg;
|
||||||
}
|
}
|
||||||
for (unsigned int i = 0; i < v2.size(); ++i)
|
for (i = 0; i < v2.size(); ++i)
|
||||||
{
|
{
|
||||||
Cmds.push_back(const_cast<char*>(v2[i].c_str()));
|
Cmds.push_back(const_cast<char*>(v2[i].c_str()));
|
||||||
}
|
}
|
||||||
|
@ -248,11 +248,12 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
|
|||||||
std::istringstream ss(aCmdLine);
|
std::istringstream ss(aCmdLine);
|
||||||
std::string arg;
|
std::string arg;
|
||||||
std::vector<std::string> v2(20, "");
|
std::vector<std::string> v2(20, "");
|
||||||
|
unsigned int i = 0;
|
||||||
while (ss >> arg)
|
while (ss >> arg)
|
||||||
{
|
{
|
||||||
v2.push_back(arg);
|
v2[i++] = arg;
|
||||||
}
|
}
|
||||||
for (unsigned int i = 0; i < v2.size(); ++i)
|
for (i = 0; i < v2.size(); ++i)
|
||||||
{
|
{
|
||||||
Cmds.push_back(const_cast<char*>(v2[i].c_str()));
|
Cmds.push_back(const_cast<char*>(v2[i].c_str()));
|
||||||
}
|
}
|
||||||
|
@ -453,16 +453,16 @@ void WESplitterApp::invokeCpimport()
|
|||||||
std::istringstream ss(aCmdLineStr);
|
std::istringstream ss(aCmdLineStr);
|
||||||
std::string arg;
|
std::string arg;
|
||||||
std::vector<std::string> v2(20, "");
|
std::vector<std::string> v2(20, "");
|
||||||
|
unsigned int i = 0;
|
||||||
while(ss >> arg)
|
while(ss >> arg)
|
||||||
{
|
{
|
||||||
//we need something that works on Windows as well as linux
|
//we need something that works on Windows as well as linux
|
||||||
v2.push_back(arg);
|
v2[i++] = arg;
|
||||||
}
|
}
|
||||||
for (unsigned int i = 0; i < v2.size(); ++i)
|
for (i = 0; i < v2.size(); ++i)
|
||||||
{
|
{
|
||||||
//we're going to exec() below, so don't worry about freeing
|
//we're going to exec() below, so don't worry about freeing
|
||||||
ptr = strdup(v2.back().c_str());
|
Cmds.push_back(const_cast<char*>(v2[i].c_str()));
|
||||||
Cmds.push_back(ptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cmds.push_back(0); //null terminate
|
Cmds.push_back(0); //null terminate
|
||||||
|
Reference in New Issue
Block a user