-
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 join result of set type #25669
Labels
Comments
aytrack
added
type/bug
The issue is confirmed as a bug.
sig/execution
SIG execution
severity/critical
labels
Jun 22, 2021
more join cases MySQL root@127.0.0.1:test> select t1.col1, t1.col2, t2.col1, t2.col2 from IDT_MULTI15955STROBJSTROBJ t1 right join IDT_MULTI15955STROBJSTROBJ t2 on t1.col1 = t2.col1;
+--------+--------+-------+------+
| col1 | col2 | col1 | col2 |
+--------+--------+-------+------+
| A | 1 | A | 1 |
| B | 1 | B | 1 |
| <null> | <null> | A,B | 1 |
| C | 1 | C | 1 |
| <null> | <null> | A,C | 2 |
| <null> | <null> | B,C | 2 |
| <null> | <null> | A,B,C | 2 |
| <null> | <null> | | 2 |
| <null> | <null> | A, | 3 |
| <null> | <null> | B, | 3 |
| <null> | <null> | A,B, | 3 |
| C, | 3 | C, | 3 |
| <null> | <null> | A,C, | 4 |
+--------+--------+-------+------+
MySQL root@127.0.0.1:test> select t1.col1, t1.col2, t2.col1, t2.col2 from IDT_MULTI15955STROBJSTROBJ t1 left join IDT_MULTI15955STROBJSTROBJ t2 on t1.col1 = t2.col1;
+-------+------+--------+--------+
| col1 | col2 | col1 | col2 |
+-------+------+--------+--------+
| A | 1 | A | 1 |
| B | 1 | B | 1 |
| A,B | 1 | <null> | <null> |
| C | 1 | C | 1 |
| A,C | 2 | <null> | <null> |
| B,C | 2 | <null> | <null> |
| A,B,C | 2 | <null> | <null> |
| | 2 | <null> | <null> |
| A, | 3 | <null> | <null> |
| B, | 3 | <null> | <null> |
| A,B, | 3 | <null> | <null> |
| C, | 3 | C, | 3 |
| A,C, | 4 | <null> | <null> |
+-------+------+--------+--------+ tidb: MySQL test> select t1.col1, t1.col2, t2.col1, t2.col2 from IDT_MULTI15955STROBJSTROBJ t1 left join IDT_MULTI15955STROBJSTROBJ t2 on t1.col1 = t2.col1;
+-------+------+-------+------+
| col1 | col2 | col1 | col2 |
+-------+------+-------+------+
| A | 1 | A | 1 |
| B | 1 | B | 1 |
| A,B | 1 | A,B | 1 |
| C | 1 | C | 1 |
| A,C | 2 | A,C | 2 |
| B,C | 2 | B,C | 2 |
| A,B,C | 2 | A,B,C | 2 |
| | 2 | | 2 |
| A, | 3 | A, | 3 |
| B, | 3 | B, | 3 |
| A,B, | 3 | A,B, | 3 |
| C, | 3 | C, | 3 |
| A,C, | 4 | A,C, | 4 |
+-------+------+-------+------+
13 rows in set
Time: 1.406s
MySQL test> select t1.col1, t1.col2, t2.col1, t2.col2 from IDT_MULTI15955STROBJSTROBJ t1 right join IDT_MULTI15955STROBJSTROBJ t2 on t1.col1 = t2.col1;
+-------+------+-------+------+
| col1 | col2 | col1 | col2 |
+-------+------+-------+------+
| A | 1 | A | 1 |
| B | 1 | B | 1 |
| A,B | 1 | A,B | 1 |
| C | 1 | C | 1 |
| A,C | 2 | A,C | 2 |
| B,C | 2 | B,C | 2 |
| A,B,C | 2 | A,B,C | 2 |
| | 2 | | 2 |
| A, | 3 | A, | 3 |
| B, | 3 | B, | 3 |
| A,B, | 3 | A,B, | 3 |
| C, | 3 | C, | 3 |
| A,C, | 4 | A,C, | 4 |
+-------+------+-------+------+
|
Closed
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)2. Symptom (optional)3. All Trigger Conditions (optional)4. Workaround (optional)5. Affected versions6. Fixed versions |
This was referenced Jun 23, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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)
master: ea1a1e7
release-5.1: 7784454
The text was updated successfully, but these errors were encountered: