@tsteur opened this Pull Request on January 16th 2020 Member

fix https://github.com/matomo-org/matomo/issues/14934

should require 2 bytes for the right part, and about 7 byes for the left part.

@tsteur commented on January 17th 2020 Member

FYI Using decimal it causes the values to appear like this: https://travis-ci.org/matomo-org/matomo/jobs/638207041#L5670

We can workaround this by using eg TRIM(TRAILING '0' FROM custom_float) AFAIK but adds some additional overhead. Decided to simply switch to DOUBLE which should store most values accurately as well if there are no objections while needing same amount of storage basically. Should be also better for comparisons etc.

@sgiehl commented on February 12th 2020 Member

while needing same amount of storage basically

Doesn't DOUBLE need the double amount of space than FLOAT 🤔

According to https://dev.mysql.com/doc/refman/8.0/en/floating-point-types.html it uses 8 instead of 4 bytes.

But nevertheless, the numbers will get stored more accurate...

@tsteur commented on February 12th 2020 Member

while needing same amount of storage basically

That was compared to the decimal alternative, not compared to float.

@tsteur commented on February 23rd 2020 Member

@sgiehl as discussed changing the type only for new installs and created FAQ for existing installs https://matomo.org/faq/how-to/how-do-i-fix-a-truncated-event-value/

This Pull Request was closed on February 24th 2020
Powered by GitHub Issue Mirror