1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-4566: Extend CompressedDBFileHeader struct with new fields.

* This patch extends CompressedDBFileHeader struct with new fields:
  `fColumWidth`, `fColDataType`, which are necessary to rebuild extent map
  from the given file. Note: new fields do not change the memory
  layout of the struct, because the size is calculated as
  max(sizeof(CompressedDBFileHeader), HDR_BUF_LEN)).

* This patch changes API of some functions, by adding new function
  argument `colDataType` when needed, to be able to call `initHdr`
  function with colDataType value.
This commit is contained in:
Denis Khalikov
2021-03-05 14:48:53 +03:00
parent 5be4bfe647
commit a2efa1efeb
11 changed files with 138 additions and 54 deletions

View File

@ -286,8 +286,12 @@ int ColumnOp::allocRowId(const TxnID& txnid, bool useStartingExtent,
if (newColStructList[i].fCompressionType > 0)
{
string errorInfo;
rc = fileOp.fillCompColumnExtentEmptyChunks(newColStructList[i].dataOid, newColStructList[i].colWidth,
emptyVal, dbRoot, partition, segment, newHwm, segFile, errorInfo);
rc = fileOp.fillCompColumnExtentEmptyChunks(
newColStructList[i].dataOid,
newColStructList[i].colWidth, emptyVal, dbRoot,
partition, segment,
newColStructList[i].colDataType, newHwm,
segFile, errorInfo);
if (rc != NO_ERROR)
return rc;
@ -310,7 +314,11 @@ int ColumnOp::allocRowId(const TxnID& txnid, bool useStartingExtent,
return rc;
}
rc = fileOp.expandAbbrevColumnExtent( pFile, dbRoot, emptyVal, newColStructList[i].colWidth);
rc = fileOp.expandAbbrevColumnExtent(
pFile, dbRoot, emptyVal,
newColStructList[i].colWidth,
newColStructList[i].colDataType);
//set hwm for this extent.
fileOp.closeFile(pFile);
@ -1330,6 +1338,7 @@ int ColumnOp::extendColumn(
int rc = extendFile(column.dataFile.fid,
emptyVal,
column.colWidth,
column.colDataType,
hwm,
startLbid,
allocSize,
@ -1401,7 +1410,8 @@ int ColumnOp::expandAbbrevExtent(const Column& column)
int rc = expandAbbrevColumnExtent(column.dataFile.pFile,
column.dataFile.fDbRoot,
emptyVal,
column.colWidth);
column.colWidth,
column.colDataType);
return rc;
}