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

Bulk update integer display width #19121

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

Oreoxmt
Copy link
Collaborator

@Oreoxmt Oreoxmt commented Nov 19, 2024

What is changed, added or deleted? (Required)

What this does is basically the following, with some manual changes:

git grep -il '[^a-z]int([0-9]*)' | grep -vE '^(information-schema|releases)' | xargs sed -i 's/[^a-z]int([0-9]*)/ int/gi'
git grep -il '[^a-z]tinyint([0-9]*)' | grep -vE '^(information-schema|releases)' | xargs sed -i 's/[^a-z]tinyint([0-9]*)/ tinyint/gi'
git grep -il '[^a-z]smallint([0-9]*)' | grep -vE '^(information-schema|releases)' | xargs sed -i 's/[^a-z]smallint([0-9]*)/ smallint/gi'
git grep -il '[^a-z]mediumint([0-9]*)' | grep -vE '^(information-schema|releases)' | xargs sed -i 's/[^a-z]mediumint([0-9]*)/ mediumint/gi'
git grep -il '[^a-z]bigint([0-9]*)' | grep -vE '^(information-schema|releases)' | xargs sed -i 's/[^a-z]bigint([0-9]*)/ bigint/gi'

Things to consider:

  • This should not affect releases/
  • We should be careful to not break formatting of table based output
  • We should be careful to not break examples that rely on display width
  • The display width may be visible in information_schema information. Also this has a lot of table based output that we should be careful not to break the formatting of.
  • Display width can still be in (older)MySQL and MariaDB output (for migration info etc)
  • tinyint(1) is a special case as it is an alias for bool (see data-type-numeric.md)
  • non-sql should not be replaced (e.g. decimal.NewFromInt(10000))
  • This should not affect tidb-cloud/

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@Oreoxmt Oreoxmt added translation/from-docs This PR is translated from a PR in pingcap/docs. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. for-release This PR relates to a TiDB release but does not have a tracked feature. v8.5 labels Nov 19, 2024
@Oreoxmt Oreoxmt self-assigned this Nov 19, 2024
@ti-chi-bot ti-chi-bot bot added area/develop This PR relates to the area of TiDB App development. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 19, 2024
@Oreoxmt
Copy link
Collaborator Author

Oreoxmt commented Nov 21, 2024

/cc @qiancai

@ti-chi-bot ti-chi-bot bot requested a review from qiancai November 21, 2024 03:45
Copy link
Collaborator

@qiancai qiancai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

basic-sql-operations.md Outdated Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Dec 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-02 02:50:23.721519753 +0000 UTC m=+1036811.341174269: ☑️ agreed by qiancai.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 2, 2024
@Oreoxmt
Copy link
Collaborator Author

Oreoxmt commented Dec 2, 2024

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2024
@Oreoxmt
Copy link
Collaborator Author

Oreoxmt commented Dec 2, 2024

/approve

Copy link

ti-chi-bot bot commented Dec 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Oreoxmt

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 ti-chi-bot bot added the approved label Dec 2, 2024
@Oreoxmt Oreoxmt added the lgtm label Dec 2, 2024
@ti-chi-bot ti-chi-bot bot merged commit 2106a42 into pingcap:master Dec 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/develop This PR relates to the area of TiDB App development. for-release This PR relates to a TiDB release but does not have a tracked feature. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. v8.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants