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

length(time(2)) is not compatible with mysql #26790

Closed
ChenPeng2013 opened this issue Aug 2, 2021 · 1 comment
Closed

length(time(2)) is not compatible with mysql #26790

ChenPeng2013 opened this issue Aug 2, 2021 · 1 comment
Assignees
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@ChenPeng2013
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists t;
create table t(a time(2));
insert into t values("2020-02-02 22:22:22.94");
select length(a),a from t;

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

release-5.1 & master & mysql 8.0.21

mysql> select length(a),a from t;
+-----------+-------------+
| length(a) | a           |
+-----------+-------------+
|        11 | 22:22:22.94 |
+-----------+-------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

release-4.0 & release-5.0

mysql> select length(a),a from t;
+-----------+-------------+
| length(a) | a           |
+-----------+-------------+
|         8 | 22:22:22.94 |
+-----------+-------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

Release Version: v4.0.14
Edition: Community
Git Commit Hash: 4f919b07f8f013e48521894c70cb69004f43c622
Git Branch: release-4.0
UTC Build Time: 2021-08-02 02:01:11
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@github-actions
Copy link

github-actions bot commented Sep 3, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
2 participants