We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
datetime
Please answer these questions before submitting your issue. Thanks!
create table t (j json); insert into t values (cast(cast("2024-10-24 11:11:11.12346" as datetime(6)) as json)); select cast(j as datetime(6)) from t;
+----------------------------+ | cast(j as datetime(6)) | +----------------------------+ | 2024-10-24 11:11:11.123460 | +----------------------------+ 1 row in set (0.00 sec)
+------------------------+ | cast(j as datetime(6)) | +------------------------+ | 2024-10-24 11:11:11 | +------------------------+ 1 row in set (0.00 sec)
Actually, there is another bug: insert into t values (cast("2024-10-24 11:11:11.12346" as datetime(6))); will fail on MySQL, but it successes on TiDB.
insert into t values (cast("2024-10-24 11:11:11.12346" as datetime(6)));
The text was updated successfully, but these errors were encountered:
It doesn't affect the real data, so it doesn't affect the unqiueness or any other property of MVI. Not a big issue.
I found this issue when I was trying to fix #53243. I'll also fix this issue later.
Sorry, something went wrong.
expression: fix the fsp of casting json as datetime/duration (#53535)
45318da
close #53352
expression: fix the fsp of casting json as datetime/duration (pingcap…
00ee739
…#53535) close pingcap#53352
YangKeao
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
Actually, there is another bug:
insert into t values (cast("2024-10-24 11:11:11.12346" as datetime(6)));
will fail on MySQL, but it successes on TiDB.4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: