-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
SHOW CREATE TABLE output with AUTO_RANDOM results in missing AUTO_RANDOM #24176
Comments
So looks like v5.0.0 also has the same issue. |
This is with a recent master branch |
This is strange...
|
Please make sure the option |
https://docs.pingcap.com/tidb/stable/comment-syntax#optimizer-comment-syntax
|
Yes this was indeed the issue. However this still surprised me. This is because I use a MySQL 8.0.23 client which I thought was not stripping out comments. However I was wrong. The reason for me thinking this is that the client is not stripping out comments that start with One way to make this easier for other users would be:
|
Even if we change all of the deploying tools, the MySQL client may not be on the same machine of the TiDB servers.
I think these approaches are not different from telling the user to use
The syntax is initially borrowed from MariaDB( |
With the 8.0.23 MySQL client TiDB specific comments are cleared out, so even with the latest client you still need to add `--comments`. Related: - pingcap/tidb#24176 (comment)
That's likely not the case for how most people would use
Currently
Note that
Thanks. Good to know the history on this. As the Oracle MySQL documentation indicates they want to get rid of |
Another thing we could consider is to recommend
|
Please edit this comment or add a new comment to complete the following informationNot a bugThis is a usability problem. |
@tangenta could you set the correct labels on this issue etc? I don't seem to have the right permissions for that. |
With the 8.0.23 MySQL client TiDB specific comments are cleared out, so even with the latest client you still need to add `--comments`. Related: - pingcap/tidb#24176 (comment)
Bug Report
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
The table having a
AUTO_RANDOM
after re-creating it from theSHOW CREATE TABLE...
statement.3. What did you see instead (Required)
No default for
id
.4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: