Bug #14363 Partitions: failure if create in stored procedure
Submitted: 26 Oct 2005 23:58 Modified: 2 Mar 2006 6:19
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.2-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Sergei Glukhov CPU Architecture:Any

[26 Oct 2005 23:58] Peter Gulutzan
Description:
I try to create a partitioned table inside a stored procedure.
I get an error message.

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

mysql> create procedure p () begin create table t23 (s1 mediumint,s2 mediumint) partition by list (s2) (partition p1 values in (0),partition p2 values in (1)); end//
Query OK, 0 rows affected (0.00 sec)

mysql> call p()//
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') (PARTITION p1 VALUES IN (0) ENGINE = MyISAM, PARTITION p2 VALUES IN (1) ENGI' at line 1
[27 Oct 2005 2:14] Jorge del Conde
I was able to repeat this in 5.1.2bk
[10 Feb 2006 12:48] 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/2440
[1 Mar 2006 8:38] 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/3297
[1 Mar 2006 9:22] Sergei Glukhov
Fixed in 5.1.8
[2 Mar 2006 6:19] 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 bugfix in 5.1.8 changelog; closed.