tidb icon indicating copy to clipboard operation
tidb copied to clipboard

*: adapt the `show columns`, `show index` and `rename` for column privilege

Open CbcWestwolf opened this issue 6 months ago • 7 comments

What problem does this PR solve?

Issue Number: ref #61706

Problem Summary:

What changed and how does it work?

Adapt the show columns, show index and rename for column privilege This PR pick pkg/executor/show.go, pkg/executor/simple.go, pkg/parser/auth/auth.go, tests/integrationtest/t/executor/show.test and tests/integrationtest/r/executor/show.result in https://github.com/pingcap/tidb/pull/61638

Check List

Tests

  • [ ] Unit test
  • [x] 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

CbcWestwolf avatar Jun 11 '25 13:06 CbcWestwolf

Codecov Report

Attention: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (release-8.5-20250606-v8.5.2@f43a133). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             release-8.5-20250606-v8.5.2     #61679   +/-   ##
================================================================
  Coverage                               ?   57.0149%           
================================================================
  Files                                  ?       1770           
  Lines                                  ?     629179           
  Branches                               ?          0           
================================================================
  Hits                                   ?     358726           
  Misses                                 ?     246333           
  Partials                               ?      24120           
Flag Coverage Δ
integration 36.9961% <83.3333%> (?)
unit 72.6778% <76.6666%> (?)

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 52.3815% <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 Jun 11 '25 13:06 codecov[bot]

/retest

CbcWestwolf avatar Jun 11 '25 14:06 CbcWestwolf

/retest

CbcWestwolf avatar Jun 11 '25 14:06 CbcWestwolf

/retest

CbcWestwolf avatar Jun 16 '25 12:06 CbcWestwolf

/retest

CbcWestwolf avatar Jun 18 '25 02:06 CbcWestwolf

@ystaticy: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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.

ti-chi-bot[bot] avatar Jun 18 '25 05:06 ti-chi-bot[bot]

So is this the same behavior as MySQL, modify index only check CREATE_INDEX, no matter whether the index references a non-privilege column?

@tiancaiamao Yes, only INDEX privilege is needed.

CbcWestwolf avatar Jun 19 '25 09:06 CbcWestwolf

[LGTM Timeline notifier]

Timeline:

  • 2025-06-19 07:14:43.272987703 +0000 UTC m=+342335.996166685: :ballot_box_with_check: agreed by tiancaiamao.
  • 2025-06-19 12:56:19.336667398 +0000 UTC m=+362832.059846380: :ballot_box_with_check: agreed by wjhuang2016.

ti-chi-bot[bot] avatar Jun 19 '25 12:06 ti-chi-bot[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiancaiamao, wjhuang2016, ystaticy

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:
  • ~~OWNERS~~ [tiancaiamao,wjhuang2016]

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 Jun 19 '25 13:06 ti-chi-bot[bot]