Skip to content

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #64836

What problem does this PR solve?

Issue Number: close #64835

Problem Summary:

What changed and how does it work?

There are two issues here.

  • First, the failure to recover during optimization led to the entire plan replayer dump failing.
  • Second, the error judgment in dumping the explain plan caused the dump to be interrupted.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

test case from #63862

mysql> SELECT /*+ read_from_storage(tikv[t0,t1,t2,t3]) */ COUNT(t2.c0), COUNT(*) FROM v1 AS t0 INNER JOIN tb1 AS t1 ON (t0.data_status = t1.c0) INNER JOIN tb0 AS t2 ON (t1.id = t2.c2) RIGHT JOIN (SELECT /*+ read_from_storage(tikv[t0]) */ t0.c0 AS col_0 FROM tb1 AS t0) AS t3 ON (t2.c1 = t3.col_0) WHERE t2.c2 GROUP BY t0.id, t0.c0, t0.c2, t0.data_status HAVING (COUNT(*) < 87);
ERROR 1105 (HY000): interface conversion: expression.Expression is nil, not *expression.ScalarFunction
mysql> plan replayer dump explain SELECT /*+ read_from_storage(tikv[t0,t1,t2,t3]) */ COUNT(t2.c0), COUNT(*) FROM v1 AS t0 INNER JOIN
tb1 AS t1 ON (t0.data_status = t1.c0) INNER JOIN tb0 AS t2 ON (t1.id = t2.c2) RIGHT JOIN (SELECT /*+ read_from_storage(tikv[t0]) */ t0.c0 AS col_0 FROM tb1 AS t0
 87) ;
+-----------------------------------------------------------+
| File_token                                                |
+-----------------------------------------------------------+
| replayer_HGAtXY8Blo2NEkaW5L0N2Q==_1764745398864348000.zip |
+-----------------------------------------------------------+
1 row in set, 2 warnings (0.06 sec)

  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Dec 12, 2025
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved labels Dec 12, 2025
@ti-chi-bot
Copy link
Member Author

@hawkingrei This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 12, 2025

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

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.

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-8.5@f5289a7). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #65002   +/-   ##
================================================
  Coverage               ?   77.2044%           
================================================
  Files                  ?       1672           
  Lines                  ?     463546           
  Branches               ?          0           
================================================
  Hits                   ?     357878           
  Misses                 ?      83845           
  Partials               ?      21823           
Flag Coverage Δ
integration 50.8861% <85.7142%> (?)
unit 72.5184% <85.7142%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9278% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 64.2280% <0.0000%> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hawkingrei
Copy link
Member

/retest

@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hawkingrei
Once this PR has been reviewed and has the lgtm label, please assign lance6716 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 12, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 12, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-12-12 08:38:20.500838212 +0000 UTC m=+1203045.314615794: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Dec 12, 2025
@EmmaDuDu
Copy link

/retest

@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 13, 2025

@ti-chi-bot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test 616c0db link true /test unit-test

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-approved Cherry pick PR approved by release team. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants