Skip to content

Document require_primary_key system variable#9886

Merged
ti-chi-bot merged 8 commits into
pingcap:masterfrom
joycse06:joycse06/document-sql_require_primary_key-sysvar
Sep 29, 2022
Merged

Document require_primary_key system variable#9886
ti-chi-bot merged 8 commits into
pingcap:masterfrom
joycse06:joycse06/document-sql_require_primary_key-sysvar

Conversation

@joycse06
Copy link
Copy Markdown
Contributor

@joycse06 joycse06 commented Aug 9, 2022

Documenting the sysvar added in this PR

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)
  • v6.2 (TiDB 6.2 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)
  • v5.0 (TiDB 5.0 versions)

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

pingcap/tidb#36146

  • This PR is translated from:
  • Other reference 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

@ti-chi-bot
Copy link
Copy Markdown
Member

ti-chi-bot commented Aug 9, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • dveeden
  • shichun-0415

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 9, 2022

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot added contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. labels Aug 9, 2022
@ti-chi-bot ti-chi-bot requested a review from shichun-0415 August 9, 2022 03:42
@ti-chi-bot
Copy link
Copy Markdown
Member

Welcome @joycse06!

It looks like this is your first PR to pingcap/docs 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to pingcap/docs. 😃

@ti-chi-bot ti-chi-bot added 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 Aug 9, 2022
Comment thread system-variables.md Outdated
- Unit: Rows
- The maximum number of rows returned by the `SELECT` statements.

### require_primary_key <span class="version-mark">New in TBD</span>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure, at what version this will become available, it has been merged already. So I think it will be included in the next cut for next version.

But someone need to confirm it for me. 🙏

@joycse06 joycse06 force-pushed the joycse06/document-sql_require_primary_key-sysvar branch from 6719b2e to cca65fd Compare August 9, 2022 03:45
@joycse06 joycse06 force-pushed the joycse06/document-sql_require_primary_key-sysvar branch from cca65fd to 6ac3583 Compare August 9, 2022 03:46
@TomShawn TomShawn requested review from bb7133 and dveeden August 11, 2022 07:35
@TomShawn TomShawn self-assigned this Aug 11, 2022
@TomShawn TomShawn added for-future-release This PR only applies to master for now and might cherry-pick to a future release. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. translation/doing This PR's assignee is translating this PR. area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. and removed missing-translation-status This PR does not have translation status info. labels Aug 11, 2022
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
- Default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION`
- This variable controls a number of MySQL compatibility behaviors. See [SQL Mode](/sql-mode.md) for more information.

### sql_require_primary_key <span class="version-mark">New in TBD</span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TBD, can/should we set a version yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I saw with some other sysvars we included versions, I don't know how docs for different versions are rendered on the website, but I wouldn't want this sysvar doc to appear on the website for a version in which its not available. If you think that's ensured by how they are rendered, then I am happy to drop this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The most likely scenario is the docs team will keep this PR open until the version is known. In the last few weeks prior to release they also pause the script which publishes the docs.

But I think you can state it as v6.3, since presumably this is the release to follow v6.2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me. I will put in v6.3

Comment thread system-variables.md Outdated

- Scope: SESSION | GLOBAL
- Default value: "OFF"
- This variable, when turned "ON" will prevent table creation without primary keys in a cluster. Behaves similar to sysvar
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This also prevents removal of PKs, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will update the doc. 👍

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 11, 2022
Comment thread system-variables.md Outdated
- Default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION`
- This variable controls a number of MySQL compatibility behaviors. See [SQL Mode](/sql-mode.md) for more information.

### sql_require_primary_key <span class="version-mark">New in TBD</span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The most likely scenario is the docs team will keep this PR open until the version is known. In the last few weeks prior to release they also pause the script which publishes the docs.

But I think you can state it as v6.3, since presumably this is the release to follow v6.2.

Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
joycse06 and others added 3 commits August 18, 2022 10:13
Co-authored-by: Morgan Tocker <tocker@gmail.com>
Co-authored-by: Morgan Tocker <tocker@gmail.com>
Co-authored-by: Morgan Tocker <tocker@gmail.com>
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 18, 2022
@shichun-0415 shichun-0415 added v6.3 This PR/issue applies to TiDB v6.3. and removed for-future-release This PR only applies to master for now and might cherry-pick to a future release. labels Sep 27, 2022
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
@shichun-0415 shichun-0415 added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR's assignee is translating this PR. labels Sep 27, 2022
joycse06 and others added 2 commits September 29, 2022 07:20
Co-authored-by: shichun-0415 <89768198+shichun-0415@users.noreply.github.com>
Co-authored-by: shichun-0415 <89768198+shichun-0415@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@shichun-0415 shichun-0415 left a comment

Choose a reason for hiding this comment

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

Thanks for your efforts! LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 28, 2022
@shichun-0415
Copy link
Copy Markdown
Contributor

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: b3a5f57

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 28, 2022
@ti-chi-bot ti-chi-bot merged commit 975d5be into pingcap:master Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. v6.3 This PR/issue applies to TiDB v6.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants