You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-06-12 05:01:56 +03:00
MCOL-5021 Add prototype support for the AUX column in CREATE/DROP
DDL commands, single and multi-value INSERTs, cpimport, and DELETE.
This commit is contained in:
@ -997,7 +997,7 @@ int WriteEngineWrapper::fillColumn(const TxnID& txnid, const OID& dataOid,
|
||||
|
||||
int WriteEngineWrapper::deleteRow(const TxnID& txnid, const vector<CSCTypesList>& colExtentsColType,
|
||||
vector<ColStructList>& colExtentsStruct, vector<void*>& colOldValueList,
|
||||
vector<RIDList>& ridLists, const int32_t tableOid)
|
||||
vector<RIDList>& ridLists, const int32_t tableOid, bool hasAUXCol)
|
||||
{
|
||||
ColTuple curTuple;
|
||||
ColStruct curColStruct;
|
||||
@ -1065,7 +1065,7 @@ int WriteEngineWrapper::deleteRow(const TxnID& txnid, const vector<CSCTypesList>
|
||||
// unfortunately I don't have a better way to instruct without passing too many parameters
|
||||
m_opType = DELETE;
|
||||
rc = updateColumnRec(txnid, colExtentsColType, colExtentsStruct, colValueList, colOldValueList, ridLists,
|
||||
dctnryExtentsStruct, dctnryValueList, tableOid);
|
||||
dctnryExtentsStruct, dctnryValueList, tableOid, hasAUXCol);
|
||||
m_opType = NOOP;
|
||||
|
||||
return rc;
|
||||
@ -4487,7 +4487,8 @@ int WriteEngineWrapper::updateColumnRec(const TxnID& txnid, const vector<CSCType
|
||||
vector<ColStructList>& colExtentsStruct, ColValueList& colValueList,
|
||||
vector<void*>& colOldValueList, vector<RIDList>& ridLists,
|
||||
vector<DctnryStructList>& dctnryExtentsStruct,
|
||||
DctnryValueList& dctnryValueList, const int32_t tableOid)
|
||||
DctnryValueList& dctnryValueList, const int32_t tableOid,
|
||||
bool hasAUXCol)
|
||||
{
|
||||
int rc = 0;
|
||||
unsigned numExtents = colExtentsStruct.size();
|
||||
@ -4600,9 +4601,31 @@ int WriteEngineWrapper::updateColumnRec(const TxnID& txnid, const vector<CSCType
|
||||
// timer.start("markExtentsInvalid");
|
||||
//#endif
|
||||
|
||||
rc = writeColumnRecUpdate(txnid, cscColTypeList, colStructList, colValueList, colOldValueList,
|
||||
ridLists[extent], tableOid, true, ridLists[extent].size(),
|
||||
¤tExtentRangesPtrs);
|
||||
if (m_opType == DELETE && hasAUXCol)
|
||||
{
|
||||
ColStructList colStructListAUX(1, colStructList.back());
|
||||
WriteEngine::CSCTypesList cscColTypeListAUX(1, cscColTypeList.back());
|
||||
ColValueList colValueListAUX(1, colValueList.back());
|
||||
std::vector<ExtCPInfo*> currentExtentRangesPtrsAUX(1, currentExtentRangesPtrs.back());
|
||||
|
||||
rc = writeColumnRecUpdate(txnid, cscColTypeListAUX, colStructListAUX, colValueListAUX, colOldValueList,
|
||||
ridLists[extent], tableOid, true, ridLists[extent].size(),
|
||||
¤tExtentRangesPtrsAUX);
|
||||
|
||||
for (auto& cpInfoPtr : currentExtentRangesPtrs)
|
||||
{
|
||||
if (cpInfoPtr)
|
||||
{
|
||||
cpInfoPtr->toInvalid();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = writeColumnRecUpdate(txnid, cscColTypeList, colStructList, colValueList, colOldValueList,
|
||||
ridLists[extent], tableOid, true, ridLists[extent].size(),
|
||||
¤tExtentRangesPtrs);
|
||||
}
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user