Bug #20409 Partitions: misleading error message for coalesce
Submitted: 12 Jun 2006 21:42 Modified: 13 Jun 2006 15:58
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1 OS:Any (All)
Assigned to: Jon Stephens CPU Architecture:Any

[12 Jun 2006 21:42] Peter Gulutzan
Description:
I have a table with 99 partitions.
I try to coalesce to 99 partitions -- that is, I am changing nothing.
I get an error message suggesting that I should drop the table.

How to repeat:
mysql> create table ts (s1 int) partition by key(s1) partitions 99;
Query OK, 0 rows affected (0.13 sec)

mysql> alter table ts coalesce partition 99;
ERROR 1495 (HY000): Cannot remove all partitions, use DROP TABLE instead
[12 Jun 2006 22:45] MySQL Verification Team
Thank you for the bug report.

mysql> create table ts (s1 int) partition by key(s1) partitions 99;
Query OK, 0 rows affected (0.13 sec)

mysql> alter table ts coalesce partition 99;
ERROR 1495 (HY000): Cannot remove all partitions, use DROP TABLE instead
mysql>
[13 Jun 2006 12:33] Mikael Ronström
The number 99 is not how many partitions that are remaining after the command.
It represents the number of partitions to coalesce (remove).
I read chapter 18.3.2 on management of partitions and this can most certainly be
improved, it is easy to read the opposite from the text.
[13 Jun 2006 15:58] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

Updated section as suggested. Added clarification.