Bug #69326 windows: cant alter partitioned innodb table - posix 2048 file handles limit hit
Submitted: 27 May 2013 12:09
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6.11 OS:Windows
Assigned to: CPU Architecture:Any

[27 May 2013 12:09] Shane Bester
Description:
A legacy of the passed.  We're still using posix things and that is limited at 2048 on windows.

Error log contains:
2013-05-27 13:44:22 6652 [ERROR] InnoDB: Cannot create temporary merge file

Client error looks like:
mysql> alter table t1 add key(b);
ERROR 23 (HY000): Out of resources when opening file 'ib*' (Errcode: 24 - Too many open files)

How to repeat:
should work:
--------------
drop table if exists t1;
create table t1(a int,b int,c int,d int,e int, f int,key(a))engine=innodb
partition by hash(a) partitions 2030;
alter table t1 add key(b);

fails:
------
drop table if exists t1;
create table t1(a int,b int,c int,d int,e int, f int,key(a))engine=innodb
partition by hash(a) partitions 2100;
alter table t1 add key(b);

Suggested fix:
use win32 api ....  check innobase_mysql_tmpfile() ?
[31 May 2013 16:33] Vladislav Vaintroub
It is not even POSIX, it is worse. FILE* is ANSI C.