Bug #16534 Trying to add multiple partitions crashes server
Submitted: 16 Jan 2006 13:02 Modified: 24 Jan 2006 11:14
Reporter: Jon Stephens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.1.6-20060116-bk OS:Linux (SuSE 9.3)
Assigned to: Mikael Ronström CPU Architecture:Any

[16 Jan 2006 13:02] Jon Stephens
Description:
CREATE TABLE employees (
  id INT NOT NULL,
  fname VARCHAR(50) NOT NULL,
  lname VARCHAR(50) NOT NULL,
  hired DATE NOT NULL
)
PARTITION BY RANGE( YEAR(hired) ) (
  PARTITION p1 VALUES LESS THAN (1991),
  PARTITION p2 VALUES LESS THAN (1996),
  PARTITION p3 VALUES LESS THAN (2001),
  PARTITION p4 VALUES LESS THAN (2005)
);

mysql> ALTER TABLE employees2 ADD PARTITION (
    ->   PARTITION p5 VALUES LESS THAN (2010), 
    ->   PARTITION p6 VALUES LESS THAN MAXVALUE
   -> );
ERROR 2013 (HY000): Lost connection to MySQL server during query

How to repeat:
See description.

Suggested fix:
If we aren't going to support adding multiple partitions in a single statement, then this needs to be handled as a syntax error.
[16 Jan 2006 13:15] MySQL Verification Team
mysql> ALTER TABLE employees ADD PARTITION (
    -> PARTITION p5 VALUES LESS THAN (2010), 
    -> PARTITION p6 VALUES LESS THAN MAXVALUE
    -> );
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[23 Jan 2006 15:43] 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/1508
[24 Jan 2006 11:14] 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 in 5.1.6 changelog and 5.1 Manual; closed.