Description:
Hi,
We met an incorrect result when using pow function with group by. The result seem to be truncated.
Thanks.
How to repeat:
create table xt1(c1 int);
insert into xt1 (c1) values(84);
select format(pow(c1,84),84) from xt1;
mysql> select format(pow(c1,84),84) from xt1;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| format(pow(c1,84),84) |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 435,973,436,827,325,500,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.000000000000000000000000000000 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
mysql> select format(pow(c1,84),84) from xt1 group by c1;
+---------------------------------------------------------------+
| format(pow(c1,84),84) |
+---------------------------------------------------------------+
| 435,973,436,827,325,500,000,000,000,000,000,000,000,000,000,0 |
+---------------------------------------------------------------+
1 row in set (0.00 sec)