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

Fail to CONVERT_TZ for invalid DateTime #11932

Open
iosmanthus opened this issue Aug 29, 2019 · 3 comments
Open

Fail to CONVERT_TZ for invalid DateTime #11932

iosmanthus opened this issue Aug 29, 2019 · 3 comments
Labels
component/expression priority/P3 The issue has P3 priority. Assigned to backlog. severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@iosmanthus
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
> set sql_mode = 'ALLOW_INVALID_DATES'
> select CONVERT_TZ(CAST('2019-4-31 2:00:00' as DATETIME), 'America/New_York', 'Asia/Shanghai')
  1. What did you expect to see?
mysql iosmanthus@(none):test> select CONVERT_TZ(CAST('2019-4-31 2:00:00' as DATETIME), 'America/New_York', 'Asia/Shanghai')                           
+----------------------------------------------------------------------------------------+
| CONVERT_TZ(CAST('2019-4-31 2:00:00' as DATETIME), 'America/New_York', 'Asia/Shanghai') |
+----------------------------------------------------------------------------------------+
| 2019-05-01 14:00:00                                                                    |
  1. What did you see instead?
mysql root@127.0.0.1:test> select CONVERT_TZ(CAST('2019-4-31 2:00:00' as DATETIME), 'America/New_York', 'Asia/Shanghai')                              
(1292, "invalid time format: '{2019 4 31 2 0 0 0}'")
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
Release Version: v3.0.0-rc.1-71-g7deedf841-dirty
Git Commit Hash: 7deedf8418c5c7f6d68cc3f0ea785cd83fefd3a8
Git Branch: master
UTC Build Time: 2019-05-15 03:14:01
GoVersion: go version go1.12.4 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false

@iosmanthus iosmanthus added the type/bug The issue is confirmed as a bug. label Aug 29, 2019
@iosmanthus
Copy link
Contributor Author

@qw4990 qw4990 added severity/critical priority/P3 The issue has P3 priority. Assigned to backlog. labels Aug 25, 2020
@scsldb scsldb added this to the v4.0.11 milestone Oct 29, 2020
@jebter jebter assigned SunRunAway and unassigned SunRunAway Nov 4, 2020
@scsldb scsldb modified the milestones: v4.0.11, v4.0.9 Nov 4, 2020
@seiya-annie
Copy link

bug caused by invalid value should be Moderate

@zz-jason zz-jason removed this from the v4.0.9 milestone Nov 30, 2020
@XuHuaiyu XuHuaiyu added the sig/execution SIG execution label Dec 21, 2020
@wshwsh12 wshwsh12 self-assigned this Dec 25, 2020
@wshwsh12 wshwsh12 removed their assignment Jun 15, 2021
@dveeden
Copy link
Contributor

dveeden commented Oct 1, 2021

Related: #8311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression priority/P3 The issue has P3 priority. Assigned to backlog. severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

9 participants