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 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:
@ -3455,12 +3455,15 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
//cout << "aCmdLine = " << aCmdLine << endl;
|
//cout << "aCmdLine = " << aCmdLine << endl;
|
||||||
std::istringstream ss(aCmdLine);
|
std::istringstream ss(aCmdLine);
|
||||||
std::string arg;
|
std::string arg;
|
||||||
std::vector<std::string> v2;
|
std::vector<std::string> v2(20, "");
|
||||||
while (ss >> arg)
|
while (ss >> arg)
|
||||||
{
|
{
|
||||||
v2.push_back(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
|
Cmds.push_back(0); //null terminate
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
* Author: Boby Paul: bpaul@calpont.com
|
* Author: Boby Paul: bpaul@calpont.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h" // Used to pickup STRERROR_R_CHAR_P definition
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
@ -71,7 +72,6 @@ using namespace messageqcpp;
|
|||||||
#include "we_cleartablelockcmd.h"
|
#include "we_cleartablelockcmd.h"
|
||||||
#include "we_dataloader.h"
|
#include "we_dataloader.h"
|
||||||
#include "we_readthread.h"
|
#include "we_readthread.h"
|
||||||
#include "config.h" // Used to pickup STRERROR_R_CHAR_P definition
|
|
||||||
|
|
||||||
#include "installdir.h"
|
#include "installdir.h"
|
||||||
|
|
||||||
@ -247,11 +247,14 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
|
|||||||
std::string aCmdLine = fCmdLineStr;
|
std::string aCmdLine = fCmdLineStr;
|
||||||
std::istringstream ss(aCmdLine);
|
std::istringstream ss(aCmdLine);
|
||||||
std::string arg;
|
std::string arg;
|
||||||
std::vector<std::string> v2;
|
std::vector<std::string> v2(20, "");
|
||||||
while (ss >> arg)
|
while (ss >> arg)
|
||||||
{
|
{
|
||||||
v2.push_back(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
|
Cmds.push_back(0); //null terminate
|
||||||
|
@ -449,14 +449,17 @@ void WESplitterApp::invokeCpimport()
|
|||||||
std::vector<char*> Cmds;
|
std::vector<char*> Cmds;
|
||||||
|
|
||||||
|
|
||||||
|
char* ptr = 0;
|
||||||
std::istringstream ss(aCmdLineStr);
|
std::istringstream ss(aCmdLineStr);
|
||||||
std::string arg;
|
std::string arg;
|
||||||
std::vector<std::string> v2;
|
std::vector<std::string> v2(20, "");
|
||||||
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
|
||||||
char* ptr = 0;
|
|
||||||
v2.push_back(arg);
|
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
|
//we're going to exec() below, so don't worry about freeing
|
||||||
ptr = strdup(v2.back().c_str());
|
ptr = strdup(v2.back().c_str());
|
||||||
Cmds.push_back(ptr);
|
Cmds.push_back(ptr);
|
||||||
|
Reference in New Issue
Block a user