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.