Bug #20750 ALTER ... ADD PARTITION caused a crash.
Submitted: 28 Jun 2006 9:49 Modified: 4 Jul 2006 15:03
Reporter: Horst Hunger Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.1.12 OS:Linux (Suse 10.1)
Assigned to: CPU Architecture:Any

[28 Jun 2006 9:49] Horst Hunger
The following Alter statement casued a crash:

ALTER TABLE systest1.tb5_eng1 ADD PARTITION (PARTITION part6 values in (20,21,22));

The table definition:

create table tb5_eng1 (
f1 int,
f2 char (15),
f3 decimal (5,3),
f4 datetime) engine=myisam
(PARTITION part1 VALUES in(1,2,3,4) $data_directory $index_directory
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES in (5,6,7,8) $data_directory $index_directory
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES in (9,10,11,12) $data_directory $index_directory
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES in (13,14,15,16) $data_directory $index_directory
(SUBPARTITION subpart41, SUBPARTITION subpart42)

How to repeat:
execute the statements above.
[28 Jun 2006 10:20] Horst Hunger
with subpartitions as follows the program runs successfully:

ALTER TABLE tb5_eng1 ADD PARTITION (PARTITION part6 values in (20,21,22)
(SUBPARTITION subpart61, SUBPARTITION subpart62));
[3 Jul 2006 19:09] Horst Hunger
Sorry, but you must remove "systest1.", that you will find in the insert statement.
It must look like

insert into tb5_eng1 values (20,'ini...

then the crash should occur.
[4 Jul 2006 15:03] Horst Hunger
Sorry, I was not aware, that do not know how to execute a test program. You also need a result file with the same name as the source file , but instead of ".test", it has the suffix ".result" and must be put in the directory "r" (same level as "t"). In this case "error_add_part6.result". The result file is a reference result to be compared to the actual result of the test. As in case of a crash the contents of the result file has no meaning you can create it by doing "touch error_add_part6.result" or copy the source into the result file.
The perl script misses the result file and stopps execution with the error  you have seen.
Please try it again, after creating the result file.