Bug #36592 wrong filename in error message when 'show variables' fails
Submitted: 8 May 2008 12:15 Modified: 30 Apr 2015 7:43
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.0.58, 5.0 BK OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D3 (Medium)

[8 May 2008 12:15] Shane Bester
Description:
show global status and show global variables both create temporary tables in the tmpdir.  If you happen to remove these files, the commands give a wrong error message:

Can't find file: 'STATUS' (errno: 2): show global status 
Can't find file: 'VARIABLES' (errno: 2): show global variables
Can't find file: 'STATUS' (errno: 2): show global status

Of course, 'STATUS' and 'VARIABLES' files are never created.  tmpfiles such as #sql_1b8_2.MYD are really being deleted.

How to repeat:
loop thread 1:
show global status;
show global variables;

loop thread 2:
rm -rf /path/to/tmpdir/*

do it at high speed :)

Suggested fix:
put the correct filename in the error message.
[11 May 2008 13:00] Sveta Smirnova
Thank you for the report.

Verified as described with 5.0 BK tree on Linux. With version 5.1 bug is not repeatable.

I used a bit different method to repeat:

$cat t/bug36592-master.opt
--tmp-table-size=1024

$cat t/bug36592.test 
show global status;

./mysql-test-run.pl --manual-gdb --record bug36592

Then in gdb: b  handler::ha_open and manually remove temporary files from var/tmp.
[30 Apr 2015 7:43] Ståle Deraas
Posted by developer:
 
Only repeatable in 5.0, so closing.