You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +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:
@ -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