Bug #28366 multiple load_file('a: ... ') causes entire mysqld process to hang
Submitted: 11 May 2007 7:15 Modified: 8 Jun 2007 23:07
Reporter: Shane Bester
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version:5.0.x OS:Microsoft Windows
Assigned to: Georgi Kodinov Target Version:
Tags: load_file, hang

[11 May 2007 7:15] Shane Bester
Description:
If somebody runs a statement like this:

SELECT LOAD_FILE('a:test');

and there is no stiffy in the drive, windows will popup a dialog box asking you to try
again, cancel, or continue.  

If you ignore that, and open a new connection and run the same:

SELECT LOAD_FILE('a:test');

Then the entire mysqld-nt.exe will hang until the dialog box is dismissed.
This is rather inconvenient behaviour.  No other connections are possible until somebody
clicks the cancel or continue button.

How to repeat:
remove stiffy from a: drive.

connection1:

SELECT LOAD_FILE('a:test');

Connection2:

SELECT LOAD_FILE('a:test');

now try make another connection using mysql -uroot and it will hang.

Suggested fix:
If there's a way to programmatically disable that windows popup box during a call to
FindFirstFile, and any other file-related functions, it should be implemented in mysql.
[29 May 2007 10:49] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/27539

ChangeSet@1.2504, 2007-05-29 11:48:20+03:00, gkodinov@magare.gmz +1 -0
  Bug #28366: multiple load_file('a: ... ') causes entire mysqld process to hang
  
  When a Windows console application that has an open console (e.g. mysqld-nt 
  started with the --console option) encounters certain type of errors 
  (like no floppy disk in a floppy drive) the OS will pop-up an 
  "abort/retry/ignore" dialog and block the application (depending on a 
  registry setting : see http://msdn2.microsoft.com/en-us/embedded/aa731206.aspx
  for details).
  Fixed by disabling the dialog popups for every error execept a GPF and
  allignment errors. This is safe to do as the actual error gets reported
  (and handled) to mysqld.
[29 May 2007 13:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/27560

ChangeSet@1.2504, 2007-05-29 14:36:21+03:00, gkodinov@magare.gmz +1 -0
  Bug #28366: multiple load_file('a: ... ') causes entire mysqld process to hang
  
  When a Windows console application that has an open console (e.g. mysqld-nt 
  started with the --console option) encounters certain type of errors 
  (like no floppy disk in a floppy drive) the OS will pop-up an 
  "abort/retry/ignore" dialog and block the application (depending on a 
  registry setting : see http://msdn2.microsoft.com/en-us/embedded/aa731206.aspx
  for details).
  Fixed by disabling the dialog popups for every error except a GPF and
  alignment errors. This is safe to do as the actual error gets reported
  (and handled) to mysqld.
[31 May 2007 14:33] Sergey Gluhov
ok to push
[4 Jun 2007 23:20] Bugs System
Pushed into 5.1.20-beta
[4 Jun 2007 23:22] Bugs System
Pushed into 5.0.44
[8 Jun 2007 23:07] Peter Lavin
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available
version, including the bug fix. More information about accessing the source trees is
available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented in 5.0.44 and 5.1.20 changelogs.