Bug #61293 partition feature (remove partitions)
Submitted: 26 May 2011 1:16 Modified: 26 May 2011 1:25
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: remove partitions

[26 May 2011 1:16] Roberto Spadim
Description:
hi guys, check if it´s a feature request or a today implemented....

i´m copying one table structure, but i don´t want partitions, and don´t want to execute code, just sql...
what i´m doing today...

create table new_table like table_partitioned;

but... new_table have same definition of table_partitioned, including partitions...

i was thinking about something...

alter table new_table remove partitions

in HASH and KEY type partition (http://dev.mysql.com/doc/refman/5.1/en/partitioning-management-hash-key.html)

i can do COALESCE PARTITION
but i want to remove partitions... what could i do?

How to repeat:
create a table with partitions

create a new table like the first
try to remove partitions only with SQL commands (no php, no perl, no c, no 'humam' interpreter)

Suggested fix:
maybe a new command?
alter table xxxxx remove partitions
or
alter table xxxxx no partitions
[26 May 2011 1:23] Roberto Spadim
i did this:
CREATE TABLE t LIKE some_partitioned_table;
ALTER TABLE t PARTITION BY HASH (any_primary_field) PARTITIONS 1;

i think its work, but it´s a partitioned table yet...

SHOW TABLE STATUS LIKE 't'

field create_option = partitioned 

any idea?
i tried to change engine, from myisam to myisam, but nothing changed
change engine to memory and after myisam, didn´t work too
[26 May 2011 1:25] Roberto Spadim
sorry found at mysql 5.6 docs

http://dev.mysql.com/doc/refman/5.6/en/alter-table.html
REMOVE PARTITIONING

bug closed