Skip to content
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

planner: reading from storage of tiflash may generate table dual path #49285

Closed
AilinKid opened this issue Dec 8, 2023 · 0 comments · Fixed by #49338
Closed

planner: reading from storage of tiflash may generate table dual path #49285

AilinKid opened this issue Dec 8, 2023 · 0 comments · Fixed by #49338
Assignees

Comments

@AilinKid
Copy link
Contributor

AilinKid commented Dec 8, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t3(id int, sala char(10), name char(100), primary key(id, sala)) partition by list columns (sala)(partition p1 values in('a'));
alter table t3 set tiflash replia 1;
explain select /*+ read_from_storage(tiflash[t3]) */ * from t3 where sala='a' and id =1;

2. What did you expect to see? (Required)

+-------------------------+---------+--------------+---------------+-------------------------------------------+
| id                      | estRows | task         | access object | operator info                             |
+-------------------------+---------+--------------+---------------+-------------------------------------------+
| TableReader_8           | 1.00    | root         | partition:p1  | MppVersion: 2, data:ExchangeSender_7      |
| └─ExchangeSender_7      | 1.00    | mpp[tiflash] |               | ExchangeType: PassThrough                 |
|   └─TableRangeScan_6     | 1.00    | mpp[tiflash] | table:t3      | range[1 'a', 1 'a']keep order:false, PartitionTableScan:true |
+-------------------------+---------+--------------+---------------+-------------------------------------------+
3 rows in set (6.791 sec)

3. What did you see instead (Required)

MySQL [test]> explain select /*+ read_from_storage(tiflash[t3]) */ * from t3 where sala='a' and id =1;
+-------------+---------+------+---------------+---------------+
| id          | estRows | task | access object | operator info |
+-------------+---------+------+---------------+---------------+
| TableDual_7 | 0.00    | root |               | rows:0        |
+-------------+---------+------+---------------+---------------+
1 row in set, 1 warning (0.001 sec)

4. What is your TiDB version? (Required)

master

@AilinKid AilinKid added the type/bug The issue is confirmed as a bug. label Dec 8, 2023
@AilinKid AilinKid self-assigned this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants