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

Cop Apply operator will not fill correlated column value in late materialization filter condition #49241

Closed
Lloyd-Pottiger opened this issue Dec 7, 2023 · 5 comments · Fixed by #49244 or pingcap/tiflash#8480
Assignees
Labels

Comments

@Lloyd-Pottiger
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(id int, value int);
create table t1(id int, value int);
insert into t values(10,5),(9,5),(8,5),(7,5),(6,5),(5,5),(4,5),(3,5),(2,5),(1,5);
insert into t1 values(2,5);
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
alter database set tiflash replica 1;
set tidb_allow_mpp=off;
select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5;
+------+
| xx   |
+------+
| NULL |
+------+
1 row in set (0.02 sec)

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

select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5;
+------+
| xx   |
+------+
|    5 |
+------+
1 row in set (0.01 sec)

3. What did you see instead (Required)

select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5;
+------+
| xx   |
+------+
| NULL |
+------+
1 row in set (0.02 sec)

4. What is your TiDB version? (Required)

v7.1.2

@Lloyd-Pottiger Lloyd-Pottiger added the type/bug The issue is confirmed as a bug. label Dec 7, 2023
@Lloyd-Pottiger
Copy link
Contributor Author

/assign

@Lloyd-Pottiger
Copy link
Contributor Author

/label affects-7.1

@Lloyd-Pottiger
Copy link
Contributor Author

/label affects-7.5

@Lloyd-Pottiger
Copy link
Contributor Author

/label severity/major

Copy link

ti-chi-bot bot commented Dec 7, 2023

@Lloyd-Pottiger: The label(s) severity/major cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5.

In response to this:

/label severity/major

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot added may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 labels Dec 7, 2023
@winoros winoros removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 labels Dec 7, 2023
ti-chi-bot bot pushed a commit that referenced this issue Dec 13, 2023
ti-chi-bot bot pushed a commit to pingcap/tiflash that referenced this issue Dec 15, 2023
ti-chi-bot bot pushed a commit to pingcap/tiflash that referenced this issue Dec 15, 2023
ti-chi-bot bot pushed a commit to pingcap/tiflash that referenced this issue Dec 15, 2023
wuhuizuo pushed a commit to PingCAP-QE/artifacts that referenced this issue Jan 26, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [pingcap/tiflash](https://togithub.com/pingcap/tiflash) | minor |
`v7.5.0` -> `v7.6.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>pingcap/tiflash (pingcap/tiflash)</summary>

###
[`v7.6.0`](https://togithub.com/pingcap/tiflash/releases/tag/v7.6.0):
TiFlash v7.6.0

[Compare
Source](https://togithub.com/pingcap/tiflash/compare/v7.5.0...v7.6.0)

For new features, improvements, and bug fixes released in 7.6.0 for
tiflash, see [TiDB 7.6.0 release
notes](https://docs.pingcap.com/tidb/v7.6/release-7.6.0/).
See the difference from the issue perspective:

<details>

-   [#&#8203;8111](https://togithub.com/pingcap/tiflash/issues/8111)
-   [#&#8203;8206](https://togithub.com/pingcap/tiflash/issues/8206)
-   [#&#8203;8215](https://togithub.com/pingcap/tiflash/issues/8215)
-   [#&#8203;8201](https://togithub.com/pingcap/tiflash/issues/8201)
-   [#&#8203;8081](https://togithub.com/pingcap/tiflash/issues/8081)
-   [#&#8203;8220](https://togithub.com/pingcap/tiflash/issues/8220)
-   [#&#8203;8211](https://togithub.com/pingcap/tiflash/issues/8211)
-   [#&#8203;8089](https://togithub.com/pingcap/tiflash/issues/8089)
-   [#&#8203;4646](https://togithub.com/pingcap/tiflash/issues/4646)
-   [#&#8203;8230](https://togithub.com/pingcap/tiflash/issues/8230)
-   [#&#8203;6233](https://togithub.com/pingcap/tiflash/issues/6233)
-   [#&#8203;8217](https://togithub.com/pingcap/tiflash/issues/8217)
-   [#&#8203;8241](https://togithub.com/pingcap/tiflash/issues/8241)
-   [#&#8203;8233](https://togithub.com/pingcap/tiflash/issues/8233)
-   [#&#8203;7695](https://togithub.com/pingcap/tiflash/issues/7695)
-   [#&#8203;8246](https://togithub.com/pingcap/tiflash/issues/8246)
-   [#&#8203;8257](https://togithub.com/pingcap/tiflash/issues/8257)
-   [#&#8203;8256](https://togithub.com/pingcap/tiflash/issues/8256)
-   [#&#8203;8249](https://togithub.com/pingcap/tiflash/issues/8249)
-   [#&#8203;8222](https://togithub.com/pingcap/tiflash/issues/8222)
-   [#&#8203;8270](https://togithub.com/pingcap/tiflash/issues/8270)
-   [#&#8203;8274](https://togithub.com/pingcap/tiflash/issues/8274)
- [#&#8203;8282](https://togithub.com/pingcap/tiflash/issues/8282),
close [#&#8203;8288](https://togithub.com/pingcap/tiflash/issues/8288)
-   [#&#8203;8287](https://togithub.com/pingcap/tiflash/issues/8287)
-   [#&#8203;8294](https://togithub.com/pingcap/tiflash/issues/8294)
-   [#&#8203;7486](https://togithub.com/pingcap/tiflash/issues/7486)
-   [#&#8203;6233](https://togithub.com/pingcap/tiflash/issues/6233)
-   [#&#8203;8312](https://togithub.com/pingcap/tiflash/issues/8312)
-   [#&#8203;8324](https://togithub.com/pingcap/tiflash/issues/8324)
-   [#&#8203;8327](https://togithub.com/pingcap/tiflash/issues/8327)
-   [#&#8203;8308](https://togithub.com/pingcap/tiflash/issues/8308)
-   [#&#8203;8331](https://togithub.com/pingcap/tiflash/issues/8331)
-   [#&#8203;8336](https://togithub.com/pingcap/tiflash/issues/8336)
-   [#&#8203;8206](https://togithub.com/pingcap/tiflash/issues/8206)
-   [#&#8203;8358](https://togithub.com/pingcap/tiflash/issues/8358)
-   [#&#8203;8356](https://togithub.com/pingcap/tiflash/issues/8356)
-   [#&#8203;8380](https://togithub.com/pingcap/tiflash/issues/8380)
-   [#&#8203;8345](https://togithub.com/pingcap/tiflash/issues/8345)
-   [#&#8203;8362](https://togithub.com/pingcap/tiflash/issues/8362)
-   [#&#8203;8367](https://togithub.com/pingcap/tiflash/issues/8367)
-   [#&#8203;8398](https://togithub.com/pingcap/tiflash/issues/8398)
-   [#&#8203;8295](https://togithub.com/pingcap/tiflash/issues/8295)
-   [#&#8203;8408](https://togithub.com/pingcap/tiflash/issues/8408)
-   [#&#8203;8399](https://togithub.com/pingcap/tiflash/issues/8399)
-   [#&#8203;8415](https://togithub.com/pingcap/tiflash/issues/8415)
-   [#&#8203;8391](https://togithub.com/pingcap/tiflash/issues/8391)
- [#&#8203;8307](https://togithub.com/pingcap/tiflash/issues/8307),
close [#&#8203;8371](https://togithub.com/pingcap/tiflash/issues/8371)
-   [#&#8203;8427](https://togithub.com/pingcap/tiflash/issues/8427)
-   [#&#8203;8334](https://togithub.com/pingcap/tiflash/issues/8334)
-   [#&#8203;8382](https://togithub.com/pingcap/tiflash/issues/8382)
-   [#&#8203;8436](https://togithub.com/pingcap/tiflash/issues/8436)
- [#&#8203;1664](https://togithub.com/pingcap/tiflash/issues/1664),
close [#&#8203;3777](https://togithub.com/pingcap/tiflash/issues/3777),
close [#&#8203;8395](https://togithub.com/pingcap/tiflash/issues/8395)
-   [#&#8203;8434](https://togithub.com/pingcap/tiflash/issues/8434)
-   [#&#8203;8433](https://togithub.com/pingcap/tiflash/issues/8433)
-   [#&#8203;8438](https://togithub.com/pingcap/tiflash/issues/8438)
-   [#&#8203;6233](https://togithub.com/pingcap/tiflash/issues/6233)
-   [#&#8203;8447](https://togithub.com/pingcap/tiflash/issues/8447)
-   [#&#8203;8459](https://togithub.com/pingcap/tiflash/issues/8459)
-   [#&#8203;8262](https://togithub.com/pingcap/tiflash/issues/8262)
- [#&#8203;8076](https://togithub.com/pingcap/tiflash/issues/8076),
close [#&#8203;8448](https://togithub.com/pingcap/tiflash/issues/8448)
-   [#&#8203;8450](https://togithub.com/pingcap/tiflash/issues/8450)
-   [#&#8203;8486](https://togithub.com/pingcap/tiflash/issues/8486)
-   [#&#8203;8482](https://togithub.com/pingcap/tiflash/issues/8482)
-   [#&#8203;8429](https://togithub.com/pingcap/tiflash/issues/8429)
-   [#&#8203;8508](https://togithub.com/pingcap/tiflash/issues/8508)
-   [#&#8203;8505](https://togithub.com/pingcap/tiflash/issues/8505)
-   [#&#8203;8382](https://togithub.com/pingcap/tiflash/issues/8382)
-   [#&#8203;8515](https://togithub.com/pingcap/tiflash/issues/8515)
-   [pingcap/tidb#49241](https://togithub.com/pingcap/tidb/issues/49241)
-   [#&#8203;8519](https://togithub.com/pingcap/tiflash/issues/8519)
-   [#&#8203;8506](https://togithub.com/pingcap/tiflash/issues/8506)
-   [#&#8203;8539](https://togithub.com/pingcap/tiflash/issues/8539)
-   [#&#8203;8311](https://togithub.com/pingcap/tiflash/issues/8311)
-   [#&#8203;8490](https://togithub.com/pingcap/tiflash/issues/8490)
-   [#&#8203;8551](https://togithub.com/pingcap/tiflash/issues/8551)
-   [#&#8203;8471](https://togithub.com/pingcap/tiflash/issues/8471)
-   [#&#8203;8501](https://togithub.com/pingcap/tiflash/issues/8501)
-   [#&#8203;8506](https://togithub.com/pingcap/tiflash/issues/8506)
-   [#&#8203;8564](https://togithub.com/pingcap/tiflash/issues/8564)
-   [#&#8203;8383](https://togithub.com/pingcap/tiflash/issues/8383)
-   [#&#8203;8562](https://togithub.com/pingcap/tiflash/issues/8562)
-   [#&#8203;8583](https://togithub.com/pingcap/tiflash/issues/8583)
-   [#&#8203;8589](https://togithub.com/pingcap/tiflash/issues/8589)
-   [#&#8203;8382](https://togithub.com/pingcap/tiflash/issues/8382)
-   [#&#8203;8592](https://togithub.com/pingcap/tiflash/issues/8592)
-   [#&#8203;8607](https://togithub.com/pingcap/tiflash/issues/8607)
-   [#&#8203;8604](https://togithub.com/pingcap/tiflash/issues/8604)
-   [#&#8203;8296](https://togithub.com/pingcap/tiflash/issues/8296)
-   [#&#8203;8578](https://togithub.com/pingcap/tiflash/issues/8578)
-   [#&#8203;8563](https://togithub.com/pingcap/tiflash/issues/8563)
-   [#&#8203;8631](https://togithub.com/pingcap/tiflash/issues/8631)
-   [#&#8203;8633](https://togithub.com/pingcap/tiflash/issues/8633)
-   [#&#8203;8550](https://togithub.com/pingcap/tiflash/issues/8550)
- [#&#8203;8590](https://togithub.com/pingcap/tiflash/issues/8590),
close [#&#8203;8624](https://togithub.com/pingcap/tiflash/issues/8624),
close [#&#8203;8625](https://togithub.com/pingcap/tiflash/issues/8625)
-   [#&#8203;8264](https://togithub.com/pingcap/tiflash/issues/8264)
-   [#&#8203;8650](https://togithub.com/pingcap/tiflash/issues/8650)
-   [#&#8203;8484](https://togithub.com/pingcap/tiflash/issues/8484)
-   [#&#8203;8601](https://togithub.com/pingcap/tiflash/issues/8601)

</details>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/PingCAP-QE/artifacts).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants