-
Notifications
You must be signed in to change notification settings - Fork 692
need to clarify the example in AUTO_RANDOM #20732
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
Comments
@OliverS929 @alastori @tangenta PTAL, thanks~ |
alastori
added a commit
to alastori/tidb-docs
that referenced
this issue
Apr 10, 2025
alastori
added a commit
to alastori/tidb-docs
that referenced
this issue
Apr 10, 2025
15 tasks
Please review: #20734 |
alastori
added a commit
to alastori/tidb-docs
that referenced
this issue
Apr 10, 2025
alastori
added a commit
to alastori/tidb-docs
that referenced
this issue
Apr 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error Report
Feedback in Chinese:
https://docs.pingcap.com/tidb/stable/auto-random/#user-scenario 文档中的代码示例存在误导,执行ALTER TABLE t AUTO_RANDOM_BASE=0;后确实会输出Can't reset AUTO_INCREMENT to 0 without FORCE option, using xxxx instead,但这并没有起效。需要使用force关键字执行设置,但直觉会让我参考ALTER TABLE t AUTO_RANDOM_BASE=0;就会去执行ALTER TABLE t force AUTO_RANDOM_BASE=0;又会报错不能将下一个ID设置为0。探索后发现需要设置成非0数字。
English translation:
In this doc, https://docs.pingcap.com/tidb/stable/auto-random/#user-scenario, the code example is misleading. After executing
ALTER TABLE t AUTO_RANDOM_BASE=0;
, it does outputCan't reset AUTO_INCREMENT to 0 without FORCE option, using xxxx instead
, but the setting does not actually take effect. You need to use theFORCE
keyword to apply the change. However, intuitively, referencingALTER TABLE t AUTO_RANDOM_BASE=0;
might lead one to tryALTER TABLE t FORCE AUTO_RANDOM_BASE=0;
, which results in an error saying that the next ID cannot be set to 0. After some exploration, I found that it must be set to a non-zero number.We need to clarify that in the doc.
The text was updated successfully, but these errors were encountered: