Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return type of DATE_ADD is wrong #31809

Closed
Defined2014 opened this issue Jan 19, 2022 · 4 comments · Fixed by #31817
Closed

Return type of DATE_ADD is wrong #31809

Defined2014 opened this issue Jan 19, 2022 · 4 comments · Fixed by #31817
Assignees
Labels
may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. severity/major type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

select DATE_ADD('2001-01-01 00:00:00.000000', INTERVAL 1 SECOND);

2. What did you expect to see? (Required)

mysql> select DATE_ADD('2001-01-01 00:00:00.000000', INTERVAL 1 SECOND);
+-----------------------------------------------------------+
| DATE_ADD('2001-01-01 00:00:00.000000', INTERVAL 1 SECOND) |
+-----------------------------------------------------------+
| 2001-01-01 00:00:01                                       |
+-----------------------------------------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> select DATE_ADD('2001-01-01 00:00:00.000000', INTERVAL 1 SECOND);
+----------------------------------------------------------------------------------------------------------------------+
| DATE_ADD('2001-01-01 00:00:00.000000', INTERVAL 1 SECOND)                                                            |
+----------------------------------------------------------------------------------------------------------------------+
| 0x323030312D30312D30312030303A30303A3031                                                                             |
+----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

7fd298d@master

@Defined2014 Defined2014 added the type/bug The issue is confirmed as a bug. label Jan 19, 2022
@Defined2014
Copy link
Contributor Author

Same as date_sub.

@Defined2014
Copy link
Contributor Author

/assign

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

@Defined2014
Copy link
Contributor Author

/severity major

@ti-chi-bot ti-chi-bot added severity/major may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. labels Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants