Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.0.4
-
None
-
2016-24, 2016-25, 2017-01
Description
The combination of mod and cast seems to result in addition of decimal points in the resulting string for columnstore table data. Note the 3rd query result, this should also be 1.
create table t1(id int) engine=columnstore;
insert into t1 values (1);
MariaDB [loans]> select id from t1;
------
id |
------
1 |
------
1 row in set (0.03 sec)
MariaDB [loans]> select cast(id as char) from t1;
------------------
cast(id as char) |
------------------
1 |
------------------
1 row in set (0.01 sec)
MariaDB [loans]> select cast(mod(id,1024) as char) from t1;
----------------------------
cast(mod(id,1024) as char) |
----------------------------
1.000000 |
----------------------------
1 row in set (0.01 sec)
MariaDB [loans]> select mod(id,1024) from t1;
--------------
mod(id,1024) |
--------------
1 |
--------------
1 row in set (0.01 sec)