tidb icon indicating copy to clipboard operation
tidb copied to clipboard

stmtsummary: change `plan_hint` column type to `text`

Open henrybw opened this issue 8 months ago • 8 comments

What problem does this PR solve?

Issue Number: close #56057

Problem Summary: The plan_hint column type is currently a VARCHAR(64), but plan hints are not limited to 64 characters and may exceed this size. Normally this would raise a "Data Too Long" warning and truncate the column value, but due to #60330, internal memtable column values are not type checked.

What changed and how does it work?

Change the plan_hint column type to text instead.

Check List

Tests

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

henrybw avatar Mar 29 '25 03:03 henrybw

Hi @henrybw. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 Mar 29 '25 03:03 tiprow[bot]

/ok-to-test

terry1purcell avatar Mar 29 '25 15:03 terry1purcell

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.0309%. Comparing base (755cc34) to head (f020afb). Report is 479 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #60331        +/-   ##
================================================
+ Coverage   73.1169%   76.0309%   +2.9139%     
================================================
  Files          1710       1788        +78     
  Lines        472562     542366     +69804     
================================================
+ Hits         345523     412366     +66843     
- Misses       105763     106490       +727     
- Partials      21276      23510      +2234     
Flag Coverage Δ
integration 53.6909% <ø> (?)
unit 72.9347% <ø> (+0.6275%) :arrow_up:

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

Components Coverage Δ
dumpling 52.7804% <ø> (+0.0893%) :arrow_up:
parser ∅ <ø> (∅)
br 66.0900% <ø> (+18.8559%) :arrow_up:
: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 Mar 29 '25 15:03 codecov[bot]

Could you add a test case for this change?

bb7133 avatar Apr 21 '25 21:04 bb7133

Could you add a test case for this change?

So this is a bit tricky to test right now, because currently this behavior doesn't generate an error for memtables (at least until https://github.com/pingcap/tidb/issues/60330 is fixed).

henrybw avatar Apr 24 '25 03:04 henrybw

[LGTM Timeline notifier]

Timeline:

  • 2025-04-27 10:25:11.529381718 +0000 UTC m=+783255.341172097: :ballot_box_with_check: agreed by xhebox.
  • 2025-06-17 08:53:29.821787235 +0000 UTC m=+175462.544966216: :ballot_box_with_check: agreed by qw4990.

ti-chi-bot[bot] avatar Jun 17 '25 08:06 ti-chi-bot[bot]

/retest

qw4990 avatar Jun 17 '25 08:06 qw4990

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, tangenta, xhebox

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

/retest

henrybw avatar Jun 20 '25 19:06 henrybw