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

MCOL-454 Fix HWM edge case

Sometimes block offset can be > 0 but HWM can be 0 this causes a
calculation error in the DATA_SIZE field of I_S.columnstore_extents
This commit is contained in:
Andrew Hutchings
2017-01-19 16:43:27 +00:00
parent 1ee2296b4e
commit d26223aa50

View File

@ -152,7 +152,15 @@ static int is_columnstore_extents_fill(THD *thd, TABLE_LIST *tables, COND *cond)
default:
table->field[14]->store("Unknown", strlen("Unknown"), cs);
}
table->field[15]->store((iter->HWM - iter->blockOffset + 1) * 8192);
// MCOL-454: special case, sometimes blockOffset can be > 0 and HWM can be 0
if (iter->HWM == 0)
{
table->field[15]->store(8192);
}
else
{
table->field[15]->store((iter->HWM - iter->blockOffset + 1) * 8192);
}
if (schema_table_store_record(thd, table))
{