Bug #26075 Cant open table when too many partition is created
Submitted: 5 Feb 2007 8:33 Modified: 27 Sep 2008 18:50
Reporter: Lim tienaik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.1.14-beta-community-nt OS:Windows (windows)
Assigned to: CPU Architecture:Any
Tags: partitioning

[5 Feb 2007 8:33] Lim tienaik
Description:
Even though the table can be created, but it cannot be use. The error message says that:
[new] ERROR 1016: Can't open file: './db_name/sales8.frm' (errno: 24)

How to repeat:
CREATE TABLE `sales8` (
  `pkid` int(11) NOT NULL AUTO_INCREMENT,
  `SALES_DATE` date NOT NULL DEFAULT '0000-00-00',
  `SALES_QTY` int(11) NOT NULL DEFAULT '0',
  `SALES_AMT` double(10,2) NOT NULL DEFAULT '0.00',
  `SALES_CUST` int(11) NOT NULL DEFAULT '0',
  `COST_OF_SALES` double(10,2) NOT NULL DEFAULT '0.00',
  KEY `pkid` (`pkid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 
PARTITION BY hash (dayofyear(SALES_DATE)) 
partitions 1000;
insert into sales8(sales_date, sales_qty,sales_amt,sales_cust,cost_of_sales) values(now(),10,15,5,5);
[5 Feb 2007 10:21] Valeriy Kravchuk
Thank you for a problem report. Sorry, but as you are limited with up to 2048 file handles on Windows now, 1000 partitions may be too high to support. Please, send your my.ini file to check also.
[6 Feb 2007 6:09] Lim tienaik
This is the message when i run it on my linux server.

[UAT_Server] ERROR 23: Out of resources when opening file './sample/sales8#P#p251.MYD' (Errcode: 24)
[19 Jun 2007 18:49] jey Razack
I have same error on RHEL4. Did you got any solution?
[12 Sep 2007 17:09] Manuel Padilha
Same behaviour on debian, mysql 5.1.19.
any news?
[27 Sep 2008 18:50] Vladislav Vaintroub
open file limitation on Windows is fixed in Bug#24509 (6.0 only)