tidb icon indicating copy to clipboard operation
tidb copied to clipboard

planner: fix the issue that `READ_FROM_STORAGE` hint doesn't consider cross-db binding (#64644)

Open ti-chi-bot opened this issue 1 month ago • 8 comments

This is an automated cherry-pick of #64644

What problem does this PR solve?

Issue Number: ref #64643

Problem Summary: planner: fix the issue that READ_FROM_STORAGE hint doesn't consider cross-db binding

What changed and how does it work?

The database name might be "*" for cross-db bindings, we need to consider this case when matching tables for READ_FROM_STORAGE hint. image

Check List

Tests

  • [x] Unit test
  • [ ] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] 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

ti-chi-bot avatar Nov 24 '25 12:11 ti-chi-bot

@qw4990 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 avatar Nov 24 '25 12:11 ti-chi-bot

@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.

ti-chi-bot[bot] avatar Nov 24 '25 12:11 ti-chi-bot[bot]

/hold, feel free to unhold when conflicts is done

AilinKid avatar Nov 25 '25 02:11 AilinKid

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: Please upload report for BASE (release-8.5@7e01c29). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #64653   +/-   ##
================================================
  Coverage               ?   78.4978%           
================================================
  Files                  ?       1687           
  Lines                  ?     482756           
  Branches               ?          0           
================================================
  Hits                   ?     378953           
  Misses                 ?      81886           
  Partials               ?      21917           
Flag Coverage Δ
integration 52.6554% <100.0000%> (?)
unit 73.3912% <100.0000%> (?)

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 69.3017% <0.0000%> (?)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 08 '25 08:12 codecov[bot]

/retest

qw4990 avatar Dec 08 '25 08:12 qw4990

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, elsa0520

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

The pull request process is described 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[bot] avatar Dec 08 '25 09:12 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-11-25 02:07:53.864315781 +0000 UTC m=+582237.513510238: :ballot_box_with_check: agreed by AilinKid.
  • 2025-12-08 09:44:41.500399565 +0000 UTC m=+861426.314177137: :ballot_box_with_check: agreed by elsa0520.

ti-chi-bot[bot] avatar Dec 08 '25 09:12 ti-chi-bot[bot]

/retest

fixdb avatar Dec 09 '25 08:12 fixdb

/unhold

qw4990 avatar Dec 15 '25 01:12 qw4990

/test check-dev2

qw4990 avatar Dec 15 '25 03:12 qw4990

@qw4990: No presubmit jobs available for pingcap/[email protected]

In response to this:

/test check-dev2

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.

tiprow[bot] avatar Dec 15 '25 03:12 tiprow[bot]

/test unit-test

qw4990 avatar Dec 15 '25 04:12 qw4990

@qw4990: No presubmit jobs available for pingcap/[email protected]

In response to this:

/test unit-test

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.

tiprow[bot] avatar Dec 15 '25 04:12 tiprow[bot]

/test unit-test

qw4990 avatar Dec 15 '25 06:12 qw4990

@qw4990: No presubmit jobs available for pingcap/[email protected]

In response to this:

/test unit-test

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.

tiprow[bot] avatar Dec 15 '25 06:12 tiprow[bot]

/test unit-test

qw4990 avatar Dec 15 '25 06:12 qw4990

@qw4990: No presubmit jobs available for pingcap/[email protected]

In response to this:

/test unit-test

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.

tiprow[bot] avatar Dec 15 '25 06:12 tiprow[bot]

/retest

qw4990 avatar Dec 15 '25 09:12 qw4990

@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
fast_test_tiprow a19bb61e8ccafa8714344484c9ae79bc06d3d484 link true /test fast_test_tiprow

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.

tiprow[bot] avatar Dec 15 '25 09:12 tiprow[bot]

/test unit-test

qw4990 avatar Dec 15 '25 11:12 qw4990

@qw4990: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

  • /test fast_test_tiprow_for_release

Use /test all to run all jobs.

In response to this:

/test unit-test

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.

tiprow[bot] avatar Dec 15 '25 11:12 tiprow[bot]