Bug #22370 Partitions: if I ask for too many, I get none
Submitted: 14 Sep 2006 23:40 Modified: 15 Sep 2006 0:30
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.12-beta-debug-log OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: CPU Architecture:Any

[14 Sep 2006 23:40] Peter Gulutzan
I create a partitioned table.
I repeatedly alter, adding partitions, until I get an error message.
I see that now there are no partitions.

How to repeat:
create table t1 (s1 int) partition by list (s1) (partition p1 values in (1));
delimiter //
create procedure p1 () begin declare v1 int; set v1 = 2; while v1 < 500 do set @v2 = concat('alter table t1 add partition (partition p',v1,'
values in (',v1,'))'); select @v2; prepare stmt1 from @v2; execute stmt1; set v1 = v1 + 1; end while; end//
call p1()//
/* the call, after many displays, will end with an error message. */
show create table t1\G

This is the result of "show create table\G":

mysql> show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `s1` int(11) DEFAULT NULL
1 row in set, 1 warning (0.01 sec)

The procedure is very similar to the one in bug#19302, which is fixed.
[15 Sep 2006 0:30] Peter Gulutzan
Odd. I myself can't repeat. I'll mark this "not repeatable" and re-open if I ever figure out what I'm doing differently.