Open JZuming opened 1 year ago
/assign @hawkingrei
We can simple the SQL like this.
select 1
from
(select false as c1) as subq_0
where (case when subq_0.c1 >= (
select
1 as c0
from
t2 as ref_4
) then 1 else 0 end
) = nullif(1 << 1, (
select
0 as c0
from
t0 as ref_8
where exists (
select
1 as c11
from
t0 as ref_13
where ref_8.c1 < ref_13.c1
)
));
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Setup the database:
Testcase
2. What did you expect to see? (Required)
No panic.
3. What did you see instead (Required)
TiDB log:
4. What is your TiDB version? (Required)
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Release Version: v7.1.0-alpha-27-gf5ca27ef3 Edition: Community Git Commit Hash: f5ca27ef326e94fb29b4ba35a5d59aa575f66880 Git Branch: master UTC Build Time: 2023-03-23 13:57:53 GoVersion: go1.20.2 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: unistore | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+