Incorrect results when use default current_date value in create table #53741
Labels
impact/wrong-result
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
may-affects-8.1
severity/critical
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
##date:2024-06-03
create table t(a date default current_date);
insert into t values();
insert into values(date('2024-06-03 00:00:00.000000'));
select count(*) from t where a='2024-06-03';
select * from t where a like '2024-06-03';
2. What did you expect to see? (Required)
select count(*) from t where a='2024-06-03';
result:2
select * from t where a like '2024-06-03';
result:2
3. What did you see instead (Required)
select count(*) from t where a='2024-06-03';
result:1
select * from t where a like '2024-06-03';
result:2
4. What is your TiDB version? (Required)
v7.1.1
The text was updated successfully, but these errors were encountered: