From dbd999640c9acd7fde901fbe08b944a88fa130ce Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 May 2007 14:36:21 +0300 Subject: 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. sql/mysqld.cc: Bug #28366: disable the system error messageboxes. --- sql/mysqld.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql/mysqld.cc') diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 051bad5b310..be0bc875509 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3574,6 +3574,11 @@ we force server id to 2, but this MySQL server will not act as a slave."); freopen(log_error_file,"a+",stderr); FreeConsole(); // Remove window } + else + { + /* Don't show error dialog box when on foreground: it stops the server */ + SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS); + } #endif /* -- cgit v1.2.1