Document require_primary_key system variable#9886
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
Welcome @joycse06! |
| - Unit: Rows | ||
| - The maximum number of rows returned by the `SELECT` statements. | ||
|
|
||
| ### require_primary_key <span class="version-mark">New in TBD</span> |
There was a problem hiding this comment.
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. 🙏
6719b2e to
cca65fd
Compare
cca65fd to
6ac3583
Compare
| - 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> |
There was a problem hiding this comment.
TBD, can/should we set a version yet?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Sounds good to me. I will put in v6.3
|
|
||
| - 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 |
There was a problem hiding this comment.
This also prevents removal of PKs, right?
There was a problem hiding this comment.
Yes, I will update the doc. 👍
…imary keys as well
| - 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> |
There was a problem hiding this comment.
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.
Co-authored-by: Morgan Tocker <tocker@gmail.com>
Co-authored-by: Morgan Tocker <tocker@gmail.com>
Co-authored-by: Morgan Tocker <tocker@gmail.com>
Co-authored-by: shichun-0415 <89768198+shichun-0415@users.noreply.github.com>
Co-authored-by: shichun-0415 <89768198+shichun-0415@users.noreply.github.com>
shichun-0415
left a comment
There was a problem hiding this comment.
Thanks for your efforts! LGTM
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: b3a5f57 |
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.
What is the related PR or file link(s)?
pingcap/tidb#36146
Do your changes match any of the following descriptions?