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

*: default value tiny update #17136

Merged
merged 4 commits into from Apr 15, 2024
Merged

*: default value tiny update #17136

merged 4 commits into from Apr 15, 2024

Conversation

hfxsd
Copy link
Collaborator

@hfxsd hfxsd commented Apr 11, 2024

First-time contributors' checklist

What is changed, added or deleted? (Required)

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.1 (TiDB 8.1 versions)
  • v8.0 (TiDB 8.0 versions)
  • v7.6 (TiDB 7.6 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.4 (TiDB 7.4 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)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 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

@hfxsd hfxsd self-assigned this Apr 11, 2024
@ti-chi-bot ti-chi-bot bot added contribution Indicates that the PR was contributed by an external member. missing-translation-status This PR does not have translation status info. labels Apr 11, 2024
@hfxsd hfxsd requested a review from zimulala April 11, 2024 02:02
@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 11, 2024
@hfxsd hfxsd added needs-cherry-pick-release-8.0 Should cherry pick this PR to release-8.0 branch. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. and removed contribution Indicates that the PR was contributed by an external member. missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 11, 2024
data-type-default-values.md Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-1-more-lgtm labels Apr 11, 2024
Copy link

ti-chi-bot bot commented Apr 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-11 02:04:17.943340108 +0000 UTC m=+1100719.470880656: ☑️ agreed by zimulala.

data-type-default-values.md Outdated Show resolved Hide resolved
@hfxsd hfxsd requested a review from qiancai April 11, 2024 02:28
@@ -8,7 +8,7 @@ aliases: ['/docs/dev/data-type-default-values/','/docs/dev/reference/sql/data-ty

The `DEFAULT` value clause in a data type specification indicates a default value for a column. The default value must be a constant and cannot be a function or an expression. But for the time type, you can specify the `NOW`, `CURRENT_TIMESTAMP`, `LOCALTIME`, and `LOCALTIMESTAMP` functions as the default for `TIMESTAMP` and `DATETIME` columns.

Starting from v8.0.0, TiDB supports [specifying expressions as default values](#specify-expressions-as-default-values) for [`BLOB`](/data-type-string.md#blob-type), [`TEXT`](/data-type-string.md#text-type), and [`JSON`](/data-type-json.md#json-type) data types.
Starting from v8.0.0, TiDB additionally supports [specifying expressions as default values](#specify-expressions-as-default-values) for [`BLOB`](/data-type-string.md#blob-type), [`TEXT`](/data-type-string.md#text-type), and [`JSON`](/data-type-json.md#json-type) data types. You can set default values for all data types, but you can only use expressions to set the [default values](#default-values) for `BLOB`, `TEXT`, and `JSON` data types.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Starting from v8.0.0, TiDB additionally supports [specifying expressions as default values](#specify-expressions-as-default-values) for [`BLOB`](/data-type-string.md#blob-type), [`TEXT`](/data-type-string.md#text-type), and [`JSON`](/data-type-json.md#json-type) data types. You can set default values for all data types, but you can only use expressions to set the [default values](#default-values) for `BLOB`, `TEXT`, and `JSON` data types.
Starting from v8.0.0, you can use expressions to set [default values](#default-values) for [`BLOB`](/data-type-string.md#blob-type), [`TEXT`](/data-type-string.md#text-type), and [`JSON`](/data-type-json.md#json-type) data types. Before v8.0.0, setting default values for these three data types is not supported.

Copy link

ti-chi-bot bot commented Apr 11, 2024

@Frank945946: 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/test-infra repository.

data-type-default-values.md Outdated Show resolved Hide resolved
@hfxsd
Copy link
Collaborator Author

hfxsd commented Apr 15, 2024

/approve

Copy link

ti-chi-bot bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

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 Apr 15, 2024
@hfxsd hfxsd added the lgtm label Apr 15, 2024
@ti-chi-bot ti-chi-bot bot merged commit 97e7dc8 into pingcap:master Apr 15, 2024
9 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.0: #17186.

ti-chi-bot bot pushed a commit that referenced this pull request Apr 15, 2024
dveeden pushed a commit to dveeden/docs that referenced this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-1-more-lgtm needs-cherry-pick-release-8.0 Should cherry pick this PR to release-8.0 branch. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants