Open davidshiz opened 1 year ago
same as #892
Related to https://github.com/stoneatom/stonedb/issues/456 , to make the result correct, we need impl decimal128 to expand max precision to 38.
I'll do a further check on this bug, when cast from double to decimal, a round operation may happen.
From issue #892:
mysql> CREATE TABLE t1 (a DECIMAL(17,0));
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (9999999999999999);
Query OK, 1 row affected (0.00 sec)
mysql> select * from t1;
+-------------------+
| a |
+-------------------+
| 10000000000000000 |
+-------------------+
1 row in set (0.00 sec)
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
Expected behavior
How To Reproduce
Environment
Are you interested in submitting a PR to solve the problem?