Timestampadd function #66425
Replies: 4 comments
-
|
原帖作者:crazycs520\n原帖时间:2023-02-04 00:22:45.786578\n\n Nice catch, look like it is a bug. I already create a bug issue for this: issue#41052: wrong result of timestampadd(month,1,date ‘2024-01-31’) |
Beta Was this translation helpful? Give feedback.
-
|
原帖作者:Jan_Schatteman\n原帖时间:2023-02-04 21:39:05.642334\n\n Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
原帖作者:winkyao\n原帖时间:2023-02-06 08:17:55.262007\n\n Hi, Jan, Seems like it was a bug of MySQL, You can refer to this reply wrong result of timestampadd(month,1,date '2024-01-31') · Issue #41052 · pingcap/tidb · GitHub. We already reported a bug to MySQL https://bugs.mysql.com/bug.php?id=109941, and have been verified as a bug by MySQL Verification Team. Thanks, please stay tuned. |
Beta Was this translation helpful? Give feedback.
-
|
原帖作者:xuhuaiyu\n原帖时间:2023-02-06 08:50:40.631611\n\n Hi, thanks for your feedback. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
原帖作者:Jan_Schatteman\n原帖时间:2023-02-03 22:21:03.896502\n原帖ID/Slug:419 / timestampadd-function\n\n
Application environment:
test was run in docker.io/pingcap/tidb:v5.1.4
Problem:
I noticed that the timestampadd function appears to return a different result in tidb as compared to mysql, e.g.
select timestampadd(month,1,date '2024-01-31')in MySQL will return ‘2024-02-29’ , whereas intidb (docker version) it returns ‘2024-03-02’, which I believe is not correct
Is this a known issue and, if so, is there a workaround?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions