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

ALTER TABLE t ADD PARTITION needs 'PARTITIONS n' for KEY and HASH partitioning, just a number is not parsed. #17835

Open
mjonss opened this issue Jun 10, 2024 · 1 comment

Comments

@mjonss
Copy link
Contributor

mjonss commented Jun 10, 2024

Change Request

Please answer the following questions before submitting your issue. Thanks!

  1. Describe what you find is inappropriate or missing in the existing docs.
    In https://docs.pingcap.com/tidb/stable/partitioned-table it says:
Increase the number of partitions using the `ALTER TABLE <table name> ADD PARTITION <number of partitions to increase by | (additional partition definitions)>` statement.

But it needs to be

Increase the number of partitions using the `ALTER TABLE <table name> ADD PARTITION {PARTITIONS <number of partitions to increase by> | (<additional partition definitions>)}` statement.

I.e. ALTER TABLE t ADD PARTITION 2 is not valid syntax, while ALTER TABLE t ADD PARTITION PARTITIONS 2 is.

  1. Describe your suggestion or addition.

  2. Provide some reference materials (such as documents and websites) if you could.
    https://docs.pingcap.com/tidb/stable/partitioned-table
    https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-hash-key.html

@dveeden
Copy link
Contributor

dveeden commented Jun 10, 2024

Did you create a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants