Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
N/A
-
None
-
2021-17
Description
MariaDB [test]> drop table if exists cs1; |
Query OK, 0 rows affected (0.293 sec) |
|
MariaDB [test]> create table cs1(d1 decimal(38,10))engine=columnstore; |
Query OK, 0 rows affected (0.258 sec) |
|
MariaDB [test]> insert into cs1 values (9999999999999999999999999999.9999999999), (1234567890123456789012345678.9012345678); |
Query OK, 2 rows affected (0.293 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select round(d1, 38), truncate(d1, 38) from cs1; |
+--------------------------------------------------------------------+--------------------------------------------------------------------+ |
| round(d1, 38) | truncate(d1, 38) | |
+--------------------------------------------------------------------+--------------------------------------------------------------------+ |
| 999999999999999999999999999.99999999999999999999999999999999999999 | 999999999999999999999999999.99999999999999999999999999999999999999 |
|
| 999999999999999999999999999.99999999999999999999999999999999999999 | 999999999999999999999999999.99999999999999999999999999999999999999 |
|
+--------------------------------------------------------------------+--------------------------------------------------------------------+ |
2 rows in set (0.093 sec) |
|
The expected results are:
|
MariaDB [test]> select round(d1, 38), truncate(d1, 38) from cs1; |
+---------------------------------------------------------------------+---------------------------------------------------------------------+ |
| round(d1, 38) | truncate(d1, 38) | |
+---------------------------------------------------------------------+---------------------------------------------------------------------+ |
| 9999999999999999999999999999.99999999990000000000000000000000000000 | 9999999999999999999999999999.99999999990000000000000000000000000000 |
|
| 1234567890123456789012345678.90123456780000000000000000000000000000 | 1234567890123456789012345678.90123456780000000000000000000000000000 |
|
+---------------------------------------------------------------------+---------------------------------------------------------------------+ |
2 rows in set (0.001 sec) |
|
MariaDB [test]> drop table if exists cs1; |
Query OK, 0 rows affected (0.235 sec) |
|
MariaDB [test]> CREATE TABLE cs1 (d1 DECIMAL(38)) ENGINE=columnstore; |
Query OK, 0 rows affected (0.166 sec) |
|
MariaDB [test]> INSERT INTO cs1 VALUES (9999999999999999999999999999999999999); |
Query OK, 1 row affected (0.171 sec)
|
|
MariaDB [test]> select round(d1, 38), truncate(d1, 38) from cs1; |
+--------------------------------------------------------------------+--------------------------------------------------------------------+ |
| round(d1, 38) | truncate(d1, 38) | |
+--------------------------------------------------------------------+--------------------------------------------------------------------+ |
| 999999999999999999999999999.99999999999999999999999999999999999999 | 999999999999999999999999999.99999999999999999999999999999999999999 |
|
+--------------------------------------------------------------------+--------------------------------------------------------------------+ |
1 row in set (0.114 sec) |
|
MariaDB [test]> select round(d1, 38), truncate(d1, 38) from cs1; |
+----------------------------------------------------------------------------+----------------------------------------------------------------------------+ |
| round(d1, 38) | truncate(d1, 38) | |
+----------------------------------------------------------------------------+----------------------------------------------------------------------------+ |
| 9999999999999999999999999999999999999.000000000000000000000000000000000000 | 9999999999999999999999999999999999999.000000000000000000000000000000000000 |
|
+----------------------------------------------------------------------------+----------------------------------------------------------------------------+ |
1 row in set (0.001 sec) |
|