1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

Merge pull request #103 from mariadb-corporation/MCOL-454-fix

MCOL-454 Fix HWM edge case
This commit is contained in:
dhall-InfiniDB
2017-01-19 14:38:54 -06:00
committed by GitHub

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))
{