1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-174 Replace custom helpers::power() with standard pow(). helpers::power() breaks with #dec > 9

This commit is contained in:
David Hall
2019-07-31 14:49:31 -05:00
parent 765d1d38d4
commit 81e745256b
8 changed files with 39 additions and 30 deletions

View File

@ -106,9 +106,9 @@ bool getUIntValFromParm(
{
d.value = 0;
}
int64_t tmpval = d.value / helpers::power(d.scale);
int lefto = (d.value - tmpval * helpers::power(d.scale)) / helpers::power(d.scale - 1);
double dscale = d.scale;
int64_t tmpval = d.value / pow(10.0, dscale);
int lefto = (d.value - tmpval * pow(10.0, dscale)) / pow(10.0, dscale - 1);
if ( tmpval >= 0 && lefto > 4 )
tmpval++;