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-3317 Moved fill-next-block from writeRow() into allocRowId.
Intro* INSERT statements could face a non-existant block when MCOL-498 feature is enabled. writeRow() guard blocks was supposed to proactively create empty blocks. The pre-patch logic failed when first value in the block has been removed by DELETE and this overwrites the whole valid block with empty magics. This patch moves proactive creation logic into allocRowId().
This commit is contained in:
@ -152,6 +152,7 @@ const int ERR_FILE_STAT = ERR_FILEBASE + 16;// Error getting stats o
|
||||
const int ERR_VB_FILE_NOT_EXIST = ERR_FILEBASE + 17;// Version buffer file not exists
|
||||
const int ERR_FILE_FLUSH = ERR_FILEBASE + 18;// Error flushing file
|
||||
const int ERR_FILE_GLOBBING = ERR_FILEBASE + 19;// Error globbing a file name
|
||||
const int ERR_FILE_EOF = ERR_FILEBASE + 20;// EOF
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// XML level error
|
||||
|
@ -2603,8 +2603,16 @@ int FileOp::readFile( IDBDataFile* pFile, unsigned char* readBuf,
|
||||
{
|
||||
if ( pFile != NULL )
|
||||
{
|
||||
if ( pFile->read( readBuf, readSize ) != readSize )
|
||||
int bc = pFile->read( readBuf, readSize );
|
||||
if (bc != readSize)
|
||||
{
|
||||
// MCOL-498 EOF if a next block is empty
|
||||
if (bc == 0)
|
||||
{
|
||||
return ERR_FILE_EOF;
|
||||
}
|
||||
return ERR_FILE_READ;
|
||||
}
|
||||
}
|
||||
else
|
||||
return ERR_FILE_NULL;
|
||||
|
Reference in New Issue
Block a user