Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
5.5.25
-
None
-
None
Description
I presume it also affects 5.3, but I didn't check.
create table t1 (d datetime(6));
|
insert into t1 values ('2012-12-12 00:00:00');
|
update t1 set d = adddate(d, interval 1.5 second);
|
select * from t1;
|
MySQL 5.6 result:
+----------------------------+
|
| d |
|
+----------------------------+
|
| 2012-12-12 00:00:01.500000 |
|
+----------------------------+
|
MariaDB result:
+----------------------------+
|
| d |
|
+----------------------------+
|
| 2012-12-12 00:00:02.000000 |
|
+----------------------------+
|
I think that MySQL result is reasonable for a server which supports fractional seconds, although https://kb.askmonty.org/en/microseconds-in-mariadb/ does not explicitly specify that microseconds support is supposed to work in this case.