Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.4.3
Description
ColumnStore currently ignores sql_mode=TIME_ROUND_FRACTIONAL:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(10,7)) ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (1.0000006); |
SET sql_mode=TIME_ROUND_FRACTIONAL; |
SELECT CAST(a AS TIME(6)) FROM t1; |
+--------------------+
|
| CAST(a AS TIME(6)) |
|
+--------------------+
|
| 00:00:01.000000 |
|
+--------------------+
|
The expected result should be:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(10,7)) ENGINE=MyISAM; |
INSERT INTO t1 VALUES (1.0000006); |
SET sql_mode=TIME_ROUND_FRACTIONAL; |
SELECT CAST(a AS TIME(6)) FROM t1; |
+--------------------+
|
| CAST(a AS TIME(6)) |
|
+--------------------+
|
| 00:00:01.000001 |
|
+--------------------+
|
Attachments
Issue Links
- relates to
-
MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
- Closed