Example : I create a table with 1000 Data .
I Partition this table
alter table rnds add primary key (id) partition by HASH(id) partitions 200;
I check in mysql data directory and found it create 5 part
rnds#P#p0.ibd , rnds#P#p1.ibd , rnds#P#p2.ibd , rnds#P#p3.ibd , rnds#P#p4.ibd
1000 row
in this table and it insert successfully .1000 data
.If you want create 5 partitions you should use:
alter table rnds partition by HASH(id) partitions 5;
This command will create 5 partitions and new rows will be added to them based on ID
. New partitions are not created automatically. You can add new partition using ADD PARTITION
command.
See this link for details.