1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00
This commit is contained in:
David Hill
2018-09-21 14:44:12 -05:00
parent 81e35e35eb
commit 72f514ca54
10 changed files with 138 additions and 74 deletions

View File

@ -3056,7 +3056,9 @@ int ha_calpont_impl_rnd_init(TABLE* table)
#ifdef PLAN_HEX_FILE
// plan serialization
ifstream ifs("/tmp/li1-plan.hex");
string tmpDir = aTmpDir + "/li1-plan.hex";
ifstream ifs(tmpDir);
ByteStream bs1;
ifs >> bs1;
ifs.close();
@ -3982,6 +3984,8 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
//set up for cpimport
std::vector<char*> Cmds;
std::string aCmdLine(startup::StartUp::installDir());
std::string aTmpDir(startup::StartUp::tmpDir());
//If local module type is not PM and Local PM query is set, error out
char escapechar[2] = "";
@ -4390,6 +4394,8 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
{
THD* thd = current_thd;
std::string aTmpDir(startup::StartUp::tmpDir());
if (!thd->infinidb_vtable.cal_conn_info)
thd->infinidb_vtable.cal_conn_info = (void*)(new cal_connection_info());
@ -4516,7 +4522,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
rc = 1;
ifstream dmlFile;
ostringstream oss;
oss << "/tmp/" << ci->tableOid << ".txt";
oss << aTmpDir << ci->tableOid << ".txt";
dmlFile.open(oss.str().c_str());
if (dmlFile.is_open())
@ -4533,7 +4539,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
rc = 1;
ifstream dmlFile;
ostringstream oss;
oss << "/tmp/" << ci->tableOid << ".txt";
oss << aTmpDir << ci->tableOid << ".txt";
dmlFile.open(oss.str().c_str());
if (dmlFile.is_open())
@ -4567,7 +4573,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
//get extra warning count if any
ifstream dmlFile;
ostringstream oss;
oss << "/tmp/" << ci->tableOid << ".txt";
oss << aTmpDir << ci->tableOid << ".txt";
dmlFile.open(oss.str().c_str());
int totalWarnCount = 0;
int colWarns = 0;
@ -5235,7 +5241,9 @@ int ha_calpont_impl_group_by_init(ha_calpont_group_by_handler* group_hand, TABLE
#ifdef PLAN_HEX_FILE
// plan serialization
ifstream ifs("/tmp/li1-plan.hex");
string tmpDir = aTmpDir + "/li1-plan.hex";
ifstream ifs(tmpDir);
ByteStream bs1;
ifs >> bs1;
ifs.close();