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

Year function can't handle some date string #26151

Open
yuqi1129 opened this issue Jul 12, 2021 · 0 comments · May be fixed by #26152
Open

Year function can't handle some date string #26151

yuqi1129 opened this issue Jul 12, 2021 · 0 comments · May be fixed by #26152
Labels
severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@yuqi1129
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Master

select year('2020|5|4|||');

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

mysql> select year('2020|5|4|||');
+---------------------+
| year('2020|5|4|||') |
+---------------------+
|                2020 |
+---------------------+
1 row in set (0.04 sec)

mysql> select version();
+------------+
| version()  |
+------------+
| 5.7.22-log |
+------------+
1 row in set (0.02 sec)

3. What did you see instead (Required)

mysql>  select year('2020|5|4|||');
ERROR 1105 (HY000): strconv.Atoi: parsing "": invalid syntax
mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: None
Edition: Community
Git Commit Hash: None
Git Branch: None
UTC Build Time: None
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

Master branch

@yuqi1129 yuqi1129 added the type/bug The issue is confirmed as a bug. label Jul 12, 2021
@yuqi1129 yuqi1129 linked a pull request Jul 12, 2021 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants