Bug #58580 Bug in counter increment/decrement
Submitted: 30 Nov 2010 5:29 Modified: 30 Nov 2010 5:38
Reporter: Tatiana Schevchenko Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.66, 5.0.72 OS:Windows
Assigned to: CPU Architecture:Any

[30 Nov 2010 5:29] Tatiana Schevchenko
Description:
I was executing long run test on the windows operating system. I did not set the maximum number of open files mysql-nt.exe can access. This resulted in 28 errors during compile time and i guess this is due to large number of connections.

mysql> show global status like '%open%';
+------------------------+------------+
| Variable_name          | Value      |
+------------------------+------------+
| Com_ha_open            | 0          |
| Com_show_open_tables   | 1          |
| Open_files             | 4294956328 | <-------- impossible
| Open_streams           | 0          |
| Open_tables            | 1          |
| Opened_tables          | 684873     |
| Slave_open_temp_tables | 0          |
+------------------------+------------+
7 rows in set (0.00 sec)

I reckon that the code is not decrementing the counter properly. 

How to repeat:
no test cases identified yet

Suggested fix:
debug the code to determine the patch thats increments/decrements the counter
[30 Nov 2010 5:33] Tatiana Schevchenko
This is the list of error that i had encountered. Too many connections might triggeer such a problem.

DBD::mysql::st execute failed: Can't open file: '.\test\test0.frm' (errno: 28) at go.pl
DBD::mysql::st execute failed: Can't open file: '.\test\test0.frm' (errno: 28) at go.pl
DBD::mysql::st execute failed: Can't open file: '.\test\test0.frm' (errno: 28) at go.pl
DBD::mysql::st execute failed: Can't open file: '.\test\test2.frm' (errno: 28) at go.pl
DBD::mysql::st execute failed: Can't open file: '.\test\test2.frm' (errno: 28) at go.pl
[30 Nov 2010 5:38] MySQL Verification Team
Tatiana, errno 28 means out of disk space.
But this looks like a duplicate of bug 29071 which is still in review..