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 execution failed when using opt_rule_blacklist #53290

Open
Nickelth opened this issue May 15, 2024 · 5 comments · May be fixed by #53631
Open

SELECT execution failed when using opt_rule_blacklist #53290

Nickelth opened this issue May 15, 2024 · 5 comments · May be fixed by #53631

Comments

@Nickelth
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t0(c0 INTEGER UNSIGNED );
CREATE TABLE t1(c0 BOOL , c1 CHAR, c2 INT);
insert into t0 values(1), (2), (3);
insert into t1 values(0, 'a', 1), (1, 'b', 2), (1, 'c', 3);
INSERT INTO mysql.opt_rule_blacklist VALUES("predicate_push_down");
ADMIN reload opt_rule_blacklist;
SELECT t1.c0 FROM  t0 RIGHT JOIN t1 ON (NOT (false));

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

+------+
| c0   |
+------+
|    1 |
|    1 |
|    0 |
|    1 |
|    1 |
|    0 |
|    1 |
|    1 |
|    0 |
+------+

3. What did you see instead (Required)

ERROR 8118 (HY000): Failed to build executor

4. What is your TiDB version? (Required)

release version 8.0.0

@yibin87
Copy link
Contributor

yibin87 commented May 24, 2024

/sig planner

@ti-chi-bot ti-chi-bot bot added the sig/planner SIG: Planner label May 24, 2024
@yibin87
Copy link
Contributor

yibin87 commented May 24, 2024

/remove-sig execution

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

yibin87 commented May 24, 2024

SQL executes correctly without using opt_rule_blacklist, change to plan issue.

@hi-rustin hi-rustin self-assigned this May 28, 2024
@hi-rustin
Copy link
Member

I will take a look.

@hi-rustin hi-rustin linked a pull request May 28, 2024 that will close this issue
13 tasks
@hi-rustin
Copy link
Member

Debug note:

The normal plan:

mysql> EXPLAIN SELECT t1.c0 FROM t0 RIGHT JOIN t1 ON (NOT (false));
+-----------------------------+--------------+-----------+---------------+--------------------------------+
| id                          | estRows      | task      | access object | operator info                  |
+-----------------------------+--------------+-----------+---------------+--------------------------------+
| HashJoin_6                  | 100000000.00 | root      |               | CARTESIAN right outer join     |
| ├─TableReader_11(Build)     | 10000.00     | root      |               | data:TableFullScan_10          |
| │ └─TableFullScan_10        | 10000.00     | cop[tikv] | table:t1      | keep order:false, stats:pseudo |
| └─TableReader_9(Probe)      | 10000.00     | root      |               | data:TableFullScan_8           |
|   └─TableFullScan_8         | 10000.00     | cop[tikv] | table:t0      | keep order:false, stats:pseudo |
+-----------------------------+--------------+-----------+---------------+--------------------------------+
5 rows in set (0.00 sec)

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.

4 participants