Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test
Submitted: 24 Feb 2006 15:10 Modified: 28 Feb 2006 19:09
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.8 OS:Linux (Linux 32 Bit OS)
Assigned to: Tomas Ulin CPU Architecture:Any

[24 Feb 2006 15:10] Jonathan Miller
Description:
The following test case hangs and never returns. If you remove the ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)) the test will run with no issues.

-- source include/have_binlog_format_row.inc
-- source include/have_ndb.inc
-- source include/master-slave.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t DATE)ENGINE=NDB PARTITION BY LIST(id) (PARTITION p0 VALUES IN (2, 4), PARTITION p1 VALUES IN (42, 142));

ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));

DROP TABLE t1;
sync_slave_with_master;

How to repeat:
1) Create test called rpl_ndb_test1.test
2) Add test from above.
3) ./mysql-test-run --force --do-test=rpl_ndb_test1
[27 Feb 2006 15:42] Tomas Ulin
simplified test case:

CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), bc
CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
y YEAR, t DATE)ENGINE=NDB PARTITION BY LIST(id) (PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));

ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));

.... hangs
[28 Feb 2006 10:35] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3232
[28 Feb 2006 12:44] Tomas Ulin
pushed to 5.1.8
[28 Feb 2006 19:09] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented fix in 5.1.8 changelog. Closed.