Bug #15523 ALTER TABLE ... PARTITION BY does not work in 5.1.3
Submitted: 6 Dec 2005 15:51 Modified: 24 Jan 2006 10:41
Reporter: Kolbe Kegel Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.4-alpha-max OS:Linux (Linux)
Assigned to: Mikael Ronström CPU Architecture:Any

[6 Dec 2005 15:51] Kolbe Kegel
Syntax for ALTER TABLE ... PARTITION BY is accepted in MySQL 5.1.3, but the statement has no effect.

How to repeat:
create table t1 (a int);
show create table t1;
alter table t1 partition by key(a) partitions 2;
show create table t1;

Note that no partition-related files appear in the data directory either (so this is not just a .frm problem).

Suggested fix:
ALTER TABLE ... PARTITION BY should work as expected
[15 Dec 2005 21:38] Mark Matthews
Are you running a -max build? I've found that this functionality only exists when running a -max build, not the standard one.
[15 Dec 2005 23:42] Kolbe Kegel
mysql 5.1.3-alpha-max (root) "test"> select version();
| version()       |
| 5.1.3-alpha-max |
1 row in set (0.00 sec)

mysql 5.1.3-alpha-max (root) "test"> show variables like 'version_comment';
| Variable_name   | Value                                        |
| version_comment | MySQL Community Edition - Experimental (GPL) |
1 row in set (0.00 sec)
[28 Dec 2005 18:19] Kolbe Kegel
Issue still exists in 5.1.4-alpha-max.
[23 Jan 2006 16:39] 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:

[24 Jan 2006 10:41] 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

Additional info:

Documented fix in 5.1.6 changelog; updated Manual; closed.