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

incorrect datetime value when comparing time with "23:22:22" #22818

Closed
ChenPeng2013 opened this issue Feb 19, 2021 · 3 comments · Fixed by #22830
Closed

incorrect datetime value when comparing time with "23:22:22" #22818

ChenPeng2013 opened this issue Feb 19, 2021 · 3 comments · Fixed by #22830
Labels
severity/critical 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);
insert into t values("23:22:22");
select * from t where a between "23:22:22" and "23:22:22";

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

mysql 8.0.23

mysql> select * from t where a between "23:22:22" and "23:22:22";
+----------+
| a        |
+----------+
| 23:22:22 |
+----------+
1 row in set (0.05 sec)

3. What did you see instead (Required)

mysql> select * from t where a between "23:22:22" and "23:22:22";
Empty set, 2 warnings (0.05 sec)
mysql> show warnings;
+---------+------+--------------------------------------+
| Level   | Code | Message                              |
+---------+------+--------------------------------------+
| Warning | 1292 | Incorrect datetime value: '23:22:22' |
| Warning | 1292 | Incorrect datetime value: '23:22:22' |
+---------+------+--------------------------------------+
2 rows in set (0.05 sec)

4. What is your TiDB version? (Required)

 Release Version: v4.0.0-beta.2-2135-gd6a2b9a37-dirty
Edition: Community
Git Commit Hash: d6a2b9a372edd3638c0ed88e1d2a5e6b702a69ed
Git Branch: master
UTC Build Time: 2021-02-11 02:48:59
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@ChenPeng2013 ChenPeng2013 added the type/bug The issue is confirmed as a bug. label Feb 19, 2021
@jebter jebter added the sig/planner SIG: Planner label Feb 20, 2021
@qw4990 qw4990 added sig/execution SIG execution and removed sig/planner SIG: Planner labels Feb 22, 2021
@XuHuaiyu XuHuaiyu removed their assignment Mar 10, 2021
@XuHuaiyu
Copy link
Contributor

/assign @b41sh

@ti-chi-bot
Copy link
Member

@XuHuaiyu: GitHub didn't allow me to assign the following users: b41sh.

Note that only pingcap members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @b41sh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-srebot
Copy link
Contributor

ti-srebot commented Mar 10, 2021

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

[v4.0.11]

6. Fixed versions

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical 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.

8 participants