Bug #46353 Incorrect error message on ALTER TABLE TRUNCATE PARTITION
Submitted: 23 Jul 2009 12:16 Modified: 29 Jul 2009 15:00
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.4 OS:Any
Assigned to: Mikael Ronström CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[23 Jul 2009 12:16] Philip Stoev
Description:
This bug is being filed on behalf of PeterG:

I'm using mysql-azalea-wl4571, built with BUILD/compile-pentium-debug-max on 64-bit SUSE.

I try to truncate a partition which doesn't exist,
or I try to truncate a subpartition,
or I try to truncate the same partition twice.
I always get the error message
ERROR 1526 (HY000): Table has no partition for value 0
which doesn't explain at all what the problem is.

How to repeat:
create table t1 (s1 int) partition by list (s1) (partition p1 values in (0));
alter table t1 truncate partition p1,p1;
Result is: ERROR 1526 (HY000): Table has no partition for value 0
Actually there is a partition for value 0, that's not the problem.
And the same thing happens if I say
alter table t1 truncate partition p0;
And the same thing happens if I try to truncate a subpartition.
[29 Jul 2009 15:00] Mikael Ronström
Pushed to WL#4444 and WL#4571 which will soon be merged
into Azalea