|
UNIX_TIMESTAMP() function currently does not handle hour/minute/second for the integer types, including decimal, as well as for char/varchar/text types. As can be seen below, results don't match the correct output (innodb):
MariaDB [test]> create table cs2 (a decimal(18))engine=columnstore;
|
Query OK, 0 rows affected (0.242 sec)
|
|
MariaDB [test]> insert into cs2 values (20201028183200);
|
Query OK, 1 row affected (0.237 sec)
|
|
MariaDB [test]> select unix_timestamp(a) from cs2;
|
+-------------------+
|
| unix_timestamp(a) |
|
+-------------------+
|
| 1603857600 |
|
+-------------------+
|
1 row in set (0.151 sec)
|
|
MariaDB [test]> create table i2 as select * from cs2;
|
Query OK, 1 row affected (0.047 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select unix_timestamp(a) from i2;
|
+-------------------+
|
| unix_timestamp(a) |
|
+-------------------+
|
| 1603924320 |
|
+-------------------+
|
1 row in set (0.002 sec)
|
|