1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1016 Fix I_S calculations

* COLUMNSTORE_EXTENTS data_size now shows the total size on the highest
segment of an extent file. It also shows 0 bytes if HWM is zero so that
if there is more than one segment it doesn't show 8192 bytes for the
lower segments.
* COMPRESSION_RATIO was missing some data and using compressed data size
instead of file size (which is probably more realistic).
This commit is contained in:
Andrew Hutchings
2017-11-07 08:28:29 +00:00
parent 6062ac034f
commit 468b2d473b
2 changed files with 8 additions and 6 deletions

View File

@ -152,14 +152,18 @@ static int is_columnstore_extents_fill(THD *thd, TABLE_LIST *tables, COND *cond)
default:
table->field[14]->store("Unknown", strlen("Unknown"), cs);
}
// MCOL-454: special case, sometimes blockOffset can be > 0 and HWM can be 0
// MCOL-1016: on multiple segments HWM is set to 0 on the lower
// segments, we don't want these to show as 8KB. The down side is
// if the column has less than 1 block it will show as 0 bytes.
// We have no lookahead without it getting messy so this is the
// best compromise.
if (iter->HWM == 0)
{
table->field[15]->store(8192);
table->field[15]->store(0);
}
else
{
table->field[15]->store((iter->HWM - iter->blockOffset + 1) * 8192);
table->field[15]->store((iter->HWM + 1) * 8192);
}
if (schema_table_store_record(thd, table))