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

SELECT INTO OUTFILE doesn't take effect when using clustered index to filter data #42093

Closed
pcqz opened this issue Mar 10, 2023 · 3 comments · Fixed by #53364
Closed

SELECT INTO OUTFILE doesn't take effect when using clustered index to filter data #42093

pcqz opened this issue Mar 10, 2023 · 3 comments · Fixed by #53364
Assignees
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@pcqz
Copy link

pcqz commented Mar 10, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t (id int not null, primary key (id) /*T![clustered_index] CLUSTERED */ );
insert into t values(1);
select * from t where id=1 into outfile '/tmp/data.txt';

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

The resulting row is written to the file data.txt.

3. What did you see instead (Required)

The resulting row is just displayed in terminal.

4. What is your TiDB version? (Required)

v6.6.0

@pcqz pcqz added the type/bug The issue is confirmed as a bug. label Mar 10, 2023
@ti-chi-bot 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. may-affects-6.1 may-affects-6.5 labels Mar 10, 2023
@bb7133 bb7133 added sig/execution SIG execution and removed sig/sql-infra SIG: SQL Infra labels Mar 10, 2023
@VelocityLight VelocityLight added the affects-7.1 This bug affects the 7.1.x(LTS) versions. label Apr 20, 2023
@ti-chi-bot ti-chi-bot added the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Oct 23, 2023
@ti-chi-bot ti-chi-bot added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Apr 9, 2024
@yibin87
Copy link
Contributor

yibin87 commented Apr 30, 2024

Seems a planner issue:
mysql> explain select * from t where id=1 into outfile '/tmp/data.txt';
+-------------+---------+------+---------------+---------------+
| id | estRows | task | access object | operator info |
+-------------+---------+------+---------------+---------------+
| Point_Get_1 | 1.00 | root | table:t | handle:1 |
+-------------+---------+------+---------------+---------------+
1 row in set (0.00 sec)

@yibin87
Copy link
Contributor

yibin87 commented Apr 30, 2024

/remove-sig execution

@ti-chi-bot ti-chi-bot bot removed the sig/execution SIG execution label Apr 30, 2024
@yibin87
Copy link
Contributor

yibin87 commented Apr 30, 2024

/sig planner

@ti-chi-bot ti-chi-bot bot added the sig/planner SIG: Planner label Apr 30, 2024
@qw4990 qw4990 self-assigned this May 8, 2024
@qw4990 qw4990 removed may-affects-4.0 This bug maybe affects 4.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. may-affects-5.0 This bug maybe affects 5.0.x versions. labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants