-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Query with distinct got wrong result #25320
Labels
Comments
mysql> desc select distinct b from test_distinct where id in (123456789101112131,123456789101112132);
+-------------------+---------+------+----------------------------------------+------------------------------+
| id | estRows | task | access object | operator info |
+-------------------+---------+------+----------------------------------------+------------------------------+
| Batch_Point_Get_1 | 2.00 | root | table:test_distinct, index:PRIMARY(id) | keep order:false, desc:false |
+-------------------+---------+------+----------------------------------------+------------------------------+
1 row in set (0.00 sec)
mysql> desc select distinct b from test_distinct;
+--------------------------+----------+-----------+---------------------+-------------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+--------------------------+----------+-----------+---------------------+-------------------------------------------------------------------------------------------+
| HashAgg_6 | 8000.00 | root | | group by:test.test_distinct.b, funcs:firstrow(test.test_distinct.b)->test.test_distinct.b |
| └─TableReader_11 | 10000.00 | root | | data:TableFullScan_10 |
| └─TableFullScan_10 | 10000.00 | cop[tikv] | table:test_distinct | keep order:false, stats:pseudo |
+--------------------------+----------+-----------+---------------------+-------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec) it's about |
Closed
Emm, distinct should not be converted to point get in the fast path. |
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 17, 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)
https://asktug.com/t/topic/93576
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v5.0.1
The text was updated successfully, but these errors were encountered: