Bug #17242 Partitions: crash if add partition in procedure twice
Submitted: 8 Feb 2006 20:17 Modified: 20 Mar 2006 23:42
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.7-beta-debug OS:Linux (SUSE 10.0)
Assigned to: CPU Architecture:Any

[8 Feb 2006 20:17] Peter Gulutzan
Description:
I create a partitioned table.
I say "alter table add partition".
I create a procedure which says "alter table add partition".
I call the procedure.
I call the same procedure a second time.
Crash.

How to repeat:
mysql> delimiter //
mysql> create table txo (s1 int) partition by list (s1) (partition p1 values in (1))//
Query OK, 0 rows affected (0.01 sec)

mysql> alter table txo add partition (partition p3 values in (2))//
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> create procedure pxo () alter table txo add partition (partition p4 values in (4))//
Query OK, 0 rows affected (0.00 sec)

mysql> call pxo()//
Query OK, 0 rows affected (0.02 sec)

mysql> call pxo()//
ERROR 2013 (HY000): Lost connection to MySQL server during query
[8 Feb 2006 21:54] MySQL Verification Team
Thank you for the bug report.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.1.7-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> delimiter //
mysql> create table txo (s1 int) partition by list (s1) (partition p1 values in
    -> (1))//
Query OK, 0 rows affected (0.02 sec)

mysql> alter table txo add partition (partition p3 values in (2))//
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> create procedure pxo () alter table txo add partition (partition p4
    -> values in (4))//
Query OK, 0 rows affected (0.02 sec)

mysql> call pxo()//
Query OK, 0 rows affected (0.02 sec)

mysql> call pxo()//
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[20 Mar 2006 22:33] Mikael Ronström
This bug should be fixed by fix pushed today for bug #17290 and bug #14350.
Please reverify it.
[20 Mar 2006 23:42] MySQL Verification Team
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.1.8-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye
miguel@hegel:~/dbs/5.0> bin/mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.1.8-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> delimiter //
mysql> create table txo (s1 int) partition by list (s1) (partition p1 values in
    -> (1))//
Query OK, 0 rows affected (0.01 sec)

mysql> alter table txo add partition (partition p3 values in (2))//
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> create procedure pxo () alter table txo add partition (partition p4
    -> values in (4))//
Query OK, 0 rows affected (0.00 sec)

mysql> call pxo()//
Query OK, 0 rows affected (0.03 sec)

mysql> call pxo()//
ERROR 1496 (HY000): Duplicate partition name p4
mysql> call pxo()//
ERROR 1496 (HY000): Duplicate partition name p4
mysql>