mysql> CREATE TABLE t1 (id INT PRIMARY KEY )
engine=myisam PARTITION BY HASH(id) PARTITIONS 1000;
Query OK, 0 rows affected (0.18 sec)
mysql> alter table t1 add column v int;
ERROR 1016 (HY000): Can't open file: './test/t1.frm' (errno: 24)
mysql> quit
Bye
$ perror 24
OS error code 24: Too many open files
Looks as if MyISAM tries to open all the 1000 partition .MYD/.MYI files at once and runs out of file handles during this operation ...
This is part of the reply i got on my bug report on the ALTER TABLE issue with MyISAM and a large number of partitions from my previous post: This is a design limitation, MyISAM have one file handle open for the .MYI file shared by all instances of one t
Tracked: Mar 07, 06:56