You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5021 Add support for AUX column in the client code calling
CalpontSystemCatalog::columnRIDs().
This commit is contained in:
@ -308,6 +308,7 @@ int RedistributeWorkerThread::buildEntryList()
|
||||
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(0);
|
||||
const CalpontSystemCatalog::TableName table = csc->tableName(fPlanEntry.table);
|
||||
CalpontSystemCatalog::RIDList cols = csc->columnRIDs(table, true);
|
||||
CalpontSystemCatalog::OID tableAuxColOid = csc->tableAUXColumnOID(table);
|
||||
|
||||
for (CalpontSystemCatalog::RIDList::iterator i = cols.begin(); i != cols.end(); i++)
|
||||
fOids.push_back(i->objnum);
|
||||
@ -317,6 +318,11 @@ int RedistributeWorkerThread::buildEntryList()
|
||||
for (CalpontSystemCatalog::DictOIDList::iterator i = dicts.begin(); i != dicts.end(); i++)
|
||||
fOids.push_back(i->dictOID);
|
||||
|
||||
if (tableAuxColOid > 3000)
|
||||
{
|
||||
fOids.push_back(tableAuxColOid);
|
||||
}
|
||||
|
||||
bool firstOid = true; // for adding segments, all columns have the same lay out.
|
||||
uint16_t source = fPlanEntry.source;
|
||||
uint16_t target = fPlanEntry.destination;
|
||||
|
@ -1308,7 +1308,6 @@ uint8_t WE_DDLCommandProc::deleteSyscolumn(ByteStream& bs, std::string& err)
|
||||
{
|
||||
int rc = 0;
|
||||
uint32_t sessionID, tmp32;
|
||||
;
|
||||
int txnID;
|
||||
string schema, tablename;
|
||||
bs >> sessionID;
|
||||
|
@ -962,7 +962,7 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
if (tableAUXColOid > 3000)
|
||||
{
|
||||
rc = BRMWrapper::getInstance()->getDbRootHWMInfo(tableAUXColOid, dbRootHWMInfoColVec[ridList.size()]);
|
||||
colWidths.push_back(1);
|
||||
colWidths.push_back(execplan::AUX_COL_WIDTH);
|
||||
dctnryStoreOids[ridList.size()] = 0;
|
||||
CalpontSystemCatalog::ROPair auxRoPair;
|
||||
auxRoPair.rid = ridList.back().rid + 1;
|
||||
@ -2300,47 +2300,6 @@ uint8_t WE_DMLCommandProc::commitBatchAutoOn(messageqcpp::ByteStream& bs, std::s
|
||||
fWEWrapper.setIsInsert(true);
|
||||
fWEWrapper.setBulkFlag(true);
|
||||
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
boost::shared_ptr<CalpontSystemCatalog> systemCatalogPtr =
|
||||
CalpontSystemCatalog::makeCalpontSystemCatalog(sessionId);
|
||||
|
||||
CalpontSystemCatalog::TableName aTableName = systemCatalogPtr->tableName(tableOid);
|
||||
CalpontSystemCatalog::RIDList ridList;
|
||||
|
||||
try
|
||||
{
|
||||
ridList = systemCatalogPtr->columnRIDs(aTableName, true);
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
err = ex.what();
|
||||
rc = 1;
|
||||
return rc;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < ridList.size(); i++)
|
||||
{
|
||||
oids[ridList[i].objnum] = ridList[i].objnum;
|
||||
}
|
||||
|
||||
CalpontSystemCatalog::DictOIDList dictOids;
|
||||
|
||||
try
|
||||
{
|
||||
dictOids = systemCatalogPtr->dictOIDs(aTableName);
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
err = ex.what();
|
||||
rc = 1;
|
||||
return rc;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < dictOids.size(); i++)
|
||||
{
|
||||
oids[dictOids[i].dictOID] = dictOids[i].dictOID;
|
||||
}
|
||||
|
||||
fWEWrapper.setTransId(txnID);
|
||||
|
||||
fWEWrapper.setIsInsert(false);
|
||||
|
Reference in New Issue
Block a user