-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-4.0This bug affects 4.0.x versions.This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table t(dt datetime);
explain select * from t where dt <= date_format('2022-02-09', '%Y-%m-%d 16:33:00');
explain select * from t where dt <= date_format('2022-02-09', '%Y-%m-%d
16:33:00');
2. What did you expect to see? (Required)
The selection condition of execution plan in both sqls are le(test.t.dt, 2022-02-09 16:33:00.000000)
3. What did you see instead (Required)
The second is le(test.t.dt, NULL)
4. What is your TiDB version? (Required)
4.0, 5.0, 5.1, and older 5.1 versions.
Metadata
Metadata
Assignees
Labels
affects-4.0This bug affects 4.0.x versions.This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.