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

maketime function gets wrong precision #27771

Open
wjhuang2016 opened this issue Sep 2, 2021 · 0 comments · May be fixed by #28068
Open

maketime function gets wrong precision #27771

wjhuang2016 opened this issue Sep 2, 2021 · 0 comments · May be fixed by #28068
Labels
affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> select maketime(12, 23, time "12");
Field   1:  `maketime(12, 23, time "12")`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       TIME
Collation:  binary (63)
Length:     17
Max_length: 15
Decimals:   6
Flags:      NOT_NULL BINARY


+-----------------------------+
| maketime(12, 23, time "12") |
+-----------------------------+
| 12:23:12.000000             |
+-----------------------------+
1 row in set (0.00 sec)

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

mysql> select maketime(12, 23, time "12");
Field   1:  `maketime(12, 23, time "12")`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       TIME
Collation:  binary (63)
Length:     10
Max_length: 8
Decimals:   0
Flags:      BINARY


+-----------------------------+
| maketime(12, 23, time "12") |
+-----------------------------+
| 12:23:12                    |
+-----------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master

@wjhuang2016 wjhuang2016 added the type/bug The issue is confirmed as a bug. label Sep 2, 2021
@w169q169 w169q169 linked a pull request Sep 15, 2021 that will close this issue
12 tasks
@VelocityLight VelocityLight added the affects-6.1 This bug affects the 6.1.x(LTS) versions. label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. severity/minor 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.

4 participants