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

Merge branch 'develop-1.1' into 1.1-merge-up

This commit is contained in:
Andrew Hutchings
2017-12-13 09:09:39 +00:00
11 changed files with 147 additions and 65 deletions

View File

@ -123,7 +123,7 @@ unsigned int compactVarBinary(char* charTmpBuf, int fieldLength)
}
}
namespace WriteEngine
{
@ -222,7 +222,7 @@ ColumnInfo::ColumnInfo(Log* logger,
// fAutoIncMgr = new ColumnAutoIncJob(logger);
}
}
//------------------------------------------------------------------------------
// ColumnInfo destructor
//------------------------------------------------------------------------------
@ -263,7 +263,7 @@ void ColumnInfo::clearMemory( )
fDictBlocks.clear();
}
//------------------------------------------------------------------------------
// If at the start of the job, We have encountered a PM that has no DB file for
// this column, or whose HWM extent is disabled; then this function is called
@ -295,7 +295,7 @@ void ColumnInfo::setupDelayedFileCreation(
column.compressionType,
dbRoot, partition, segment );
}
//------------------------------------------------------------------------------
// Create a DB file as part of delayed file creation. See setupDelayedFile-
// Creation for an explanation.
@ -529,7 +529,7 @@ int ColumnInfo::createDelayedFileIfNeeded( const std::string& tableName )
return rc;
}
//------------------------------------------------------------------------------
// Add an extent for this column. The next segment file in the DBRoot,
// partition, segment number rotation will be selected for the extent.
@ -641,7 +641,7 @@ int ColumnInfo::extendColumn( bool saveLBIDForCP )
return rc;
}
//------------------------------------------------------------------------------
// Add a new extent to this column, at the specified DBRoot. Partition may be
// used if DBRoot is empty.
@ -804,7 +804,7 @@ int ColumnInfo::extendColumnNewExtent(
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Fill out existing partial extent to extent boundary, so that we can resume
// inserting rows on an extent boundary basis. This use case should only take
@ -916,7 +916,7 @@ int ColumnInfo::extendColumnOldExtent(
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Either add or update the File object, so that it has the updated HWM.
// We will access this info to update the HWM in the ExtentMap at the end
@ -970,7 +970,7 @@ void ColumnInfo::addToSegFileList( File& dataFile, HWM hwm )
fSegFileUpdateList.push_back( dataFile );
}
}
//------------------------------------------------------------------------------
// Reset file offset data member attributes when we start working on the next
// extent.
@ -998,7 +998,7 @@ int ColumnInfo::resetFileOffsetsNewExtent(const char* /*hdr*/)
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Set current size of file in raw (uncompressed) bytes, given the specified
// hwm. abbrevFlag indicates whether this is a fixed size abbreviated extent.
@ -1032,7 +1032,7 @@ void ColumnInfo::setFileSize( HWM hwm, int abbrevFlag )
}
}
}
//------------------------------------------------------------------------------
// If we are dealing with the first extent in the first segment file for this
// column, and the segment file is still equal to 256K rows, then we set the
@ -1064,7 +1064,7 @@ void ColumnInfo::setAbbrevExtentCheck( )
}
}
}
//------------------------------------------------------------------------------
// If this is an abbreviated extent, we expand the extent to a full extent on
// disk, by initializing the necessary number of remaining blocks.
@ -1144,7 +1144,7 @@ int ColumnInfo::expandAbbrevExtent( bool bRetainFilePos )
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Close the current Column file.
//------------------------------------------------------------------------------
@ -1158,7 +1158,7 @@ int ColumnInfo::closeColumnFile(bool /*bCompletingExtent*/, bool /*bAbort*/)
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Initialize fLastInputRowInCurrentExtent used in detecting when a Read Buffer
// is crossing an extent boundary, so that we can accurately track the min/max
@ -1207,7 +1207,7 @@ void ColumnInfo::lastInputRowInExtentInit( bool bIsNewExtent )
bIsNewExtent );
}
}
//------------------------------------------------------------------------------
// Increment fLastRIDInExtent to the end of the next extent.
//------------------------------------------------------------------------------
@ -1215,7 +1215,7 @@ void ColumnInfo::lastInputRowInExtentInc( )
{
fLastInputRowInCurrentExtent += fRowsPerExtent;
}
//------------------------------------------------------------------------------
// Parsing is complete for this column. Flush pending data. Close the current
// segment file, and corresponding dictionary store file (if applicable). Also
@ -1281,7 +1281,7 @@ int ColumnInfo::finishParsing( )
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Store updated column information in BRMReporter for this column at EOJ;
// so that Extent Map CP information and HWM's can be updated.
@ -1306,7 +1306,7 @@ void ColumnInfo::getBRMUpdateInfo( BRMReporter& brmReporter )
if (entriesAdded > 0)
getCPInfoForBRM( brmReporter );
}
//------------------------------------------------------------------------------
// Get updated Casual Partition (CP) information for BRM for this column at EOJ.
//------------------------------------------------------------------------------
@ -1314,7 +1314,7 @@ void ColumnInfo::getCPInfoForBRM( BRMReporter& brmReporter )
{
fColExtInf->getCPInfoForBRM(column, brmReporter);
}
//------------------------------------------------------------------------------
// Get updated HWM information for BRM for this column at EOJ.
// Returns count of the number of HWM entries added to the BRMReporter.
@ -1388,7 +1388,7 @@ int ColumnInfo::getHWMInfoForBRM( BRMReporter& brmReporter )
return entriesAdded;
}
//------------------------------------------------------------------------------
// Setup initial extent we will begin loading at start of import.
// DBRoot, partition, segment, etc for the starting extent are specified.
@ -1516,7 +1516,7 @@ int ColumnInfo::setupInitialColumnExtent(
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Prepare the initial column segment file for import.
//------------------------------------------------------------------------------
@ -1579,7 +1579,7 @@ int ColumnInfo::setupInitialColumnFile( HWM oldHwm, HWM hwm )
return NO_ERROR;
}
//------------------------------------------------------------------------------
// Update the number of bytes in the file, and the free space still remaining.
//------------------------------------------------------------------------------
@ -1600,7 +1600,7 @@ bool ColumnInfo::isFileComplete() const
return false;
}
//------------------------------------------------------------------------------
// Initialize last used auto-increment value from the current "next"
// auto-increment value taken from the system catalog (or BRM).
@ -1633,7 +1633,7 @@ int ColumnInfo::finishAutoInc( )
return rc;
}
//------------------------------------------------------------------------------
// Get current dbroot, partition, segment, and HWM for this column.
//
@ -1656,7 +1656,7 @@ void ColumnInfo::getSegFileInfo( DBRootExtentInfo& fileInfo )
else
fileInfo.fLocalHwm = 0;
}
//------------------------------------------------------------------------------
// Open a new or existing Dictionary store file based on the DBRoot,
// partition, and segment settings in curCol.dataFile.
@ -1805,7 +1805,7 @@ int ColumnInfo::openDctnryStore( bool bMustExist )
return rc;
}
//------------------------------------------------------------------------------
// Close the current Dictionary store file.
//------------------------------------------------------------------------------
@ -1837,7 +1837,7 @@ int ColumnInfo::closeDctnryStore(bool bAbort)
return rc;
}
//------------------------------------------------------------------------------
// Update dictionary store file with specified strings, and return the assigned
// tokens (tokenbuf) to be stored in the corresponding column token file.
@ -1903,7 +1903,7 @@ int ColumnInfo::updateDctnryStore(char* buf,
return NO_ERROR;
}
//------------------------------------------------------------------------------
// No action necessary for uncompressed dictionary files
//------------------------------------------------------------------------------
@ -1924,7 +1924,7 @@ const
{
return NO_ERROR;
}
//------------------------------------------------------------------------------
// utility to convert a Status enumeration to a string
//------------------------------------------------------------------------------