-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Wrong results with correlated subquery #32089
Labels
affects-4.0
This bug affects 4.0.x versions.
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
severity/critical
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Comments
ti-chi-bot
added
may-affects-4.0
This bug maybe affects 4.0.x versions.
may-affects-5.0
This bug maybe affects 5.0.x versions.
may-affects-5.1
This bug maybe affects 5.1.x versions.
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
labels
Feb 2, 2022
morgo
changed the title
TiDB nested select results not consistent with Mysql.
Wrong results with correlated subquery
Feb 2, 2022
Verified as described. This looks to be a bug in the 'correlated' part of the subquery: tidb> SELECT (SELECT 1 FROM t1 WHERE c=1) FROM t2;
+------------------------------+
| (SELECT 1 FROM t1 WHERE c=1) |
+------------------------------+
| NULL |
| NULL |
+------------------------------+
2 rows in set (0.00 sec)
tidb> SELECT (SELECT 1 FROM t1 WHERE a=b AND c=1) FROM t2;
+--------------------------------------+
| (SELECT 1 FROM t1 WHERE a=b AND c=1) |
+--------------------------------------+
| 1 |
| 1 |
+--------------------------------------+
2 rows in set (0.00 sec) |
jebter
added
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
labels
Feb 8, 2022
ti-chi-bot
removed
may-affects-5.1
This bug maybe affects 5.1.x versions.
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.0
This bug maybe affects 5.0.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
labels
Feb 8, 2022
seems "SELECT (SELECT |
12 tasks
winoros
added
affects-4.0
This bug affects 4.0.x versions.
and removed
may-affects-4.0
This bug maybe affects 4.0.x versions.
labels
Feb 15, 2022
This was referenced Feb 23, 2022
planner: don't decorrelate the APPLY when the inner's projection reference no column (#32370)
#32573
Closed
planner: don't decorrelate the APPLY when the inner's projection reference no column (#32370)
#32574
Merged
planner: don't decorrelate the APPLY when the inner's projection reference no column (#32370)
#32575
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-4.0
This bug affects 4.0.x versions.
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
severity/critical
sig/planner
SIG: Planner
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)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: