Bug #47664 Partitions: hang if two alters
Submitted: 28 Sep 2009 0:01 Modified: 2 Dec 2009 7:36
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.4.4-alpha OS:Linux (SUSE 11.1 64-bit)
Assigned to: CPU Architecture:Any
Tags: regression
Triage: Triaged: D2 (Serious)

[28 Sep 2009 0:01] Peter Gulutzan
Description:
I'm using mysql-azalea-wl4571. (There is no problem with mysql-5.1.)

I create a table with partitions and subpartitions.
I insert a few rows.
I try to alter the table, and fail.
I try to alter the table again.
Hang.

How to repeat:
drop database test;
create database test;
use test
create table tv (s1 int, s2 int) engine=myisam partition by list (s1) subpartition by hash (s2) (partition p9 values in (0,9,10,null));
insert into tv (s1) values (9);
insert into tv select s1, -s1 from tv;
alter table tv engine = myisam;
alter table tv engine = myisam;

Example run:

mysql> drop database test;
Query OK, 1 row affected (0.17 sec)

mysql> create database test;
Query OK, 1 row affected (0.00 sec)

mysql> use test
Database changed
mysql> create table tv (s1 int, s2 int) engine=myisam partition by list (s1) subpartition by hash (s2) (partition p9 values in (0,9,10,null));
Query OK, 0 rows affected (0.08 sec)

mysql> insert into tv (s1) values (9);
Query OK, 1 row affected (0.00 sec)

mysql> insert into tv select s1, -s1 from tv;
Query OK, 1 row affected (0.00 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> alter table tv engine = myisam;
ERROR 1499 (HY000): Too many partitions (including subpartitions) were defined
mysql> alter table tv engine = myisam;

... There will be no return.
[28 Sep 2009 3:32] Valeriy Kravchuk
Can't repeat this with trunk (5.4.3):

mysql> insert into tv select s1, -s1 from tv;
Query OK, 1 row affected (0.02 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> alter table tv engine = myisam;
ERROR 1499 (HY000): Too many partitions (including subpartitions) were defined
mysql> alter table tv engine = myisam;
ERROR 1499 (HY000): Too many partitions (including subpartitions) were defined

But on 5.4.4 (former next tree) it is repeatable.
[21 Oct 2009 13:37] Philip Stoev
I can not reproduce this against mysql-azalea-wl4571