List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:July 24 2009 4:52pm
Subject:bzr push into mysql-5.1-mtr branch (Bjorn.Munch:2808 to 2809) Bug#46212
View as plain text  
 2809 Bjorn Munch	2009-07-23
      Bug #46212 safe_process: FATAL ERROR, Unknown option: --nocore
      Also fixed mysqld.cc to avoid popup-boxes

    modified:
      mysql-test/lib/My/SafeProcess/safe_process_win.cc
      sql/mysqld.cc
 2808 Bjorn Munch	2009-07-17
      Bug #45700 MTR v1 --start-and-exit --default-storage-engine=Innodb is froken
      Change of variable states in Bug 19027 was not backported to v1
      Changed ne "TRUE" to eq "OFF"

    modified:
      mysql-test/lib/v1/mtr_cases.pl
=== modified file 'mysql-test/lib/My/SafeProcess/safe_process_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2009-07-15 12:20:56 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2009-07-23 17:01:24 +0000
@@ -163,6 +163,7 @@ int main(int argc, const char** argv )
   HANDLE job_handle;
   HANDLE wait_handles[NUM_HANDLES]= {0};
   PROCESS_INFORMATION process_info= {0};
+  BOOL nocore= FALSE;
 
   sprintf(safe_process_name, "safe_process[%d]", pid);
 
@@ -199,18 +200,22 @@ int main(int argc, const char** argv )
       }
       break;
     } else {
-      if ( strcmp(arg, "--verbose") == 0 )
+      if (strcmp(arg, "--verbose") == 0)
         verbose++;
-	  else if ( strncmp(arg, "--parent-pid", 10) == 0 )
-	  {
-	    /* Override parent_pid with a value provided by user */
-		const char* start;
+      else if (strncmp(arg, "--parent-pid", 10) == 0)
+      {
+            /* Override parent_pid with a value provided by user */
+        const char* start;
         if ((start= strstr(arg, "=")) == NULL)
-		  die("Could not find start of option value in '%s'", arg);
-		start++; /* Step past = */
-		if ((parent_pid= atoi(start)) == 0)
-		  die("Invalid value '%s' passed to --parent-id", start);
-	  }
+          die("Could not find start of option value in '%s'", arg);
+        start++; /* Step past = */
+        if ((parent_pid= atoi(start)) == 0)
+          die("Invalid value '%s' passed to --parent-id", start);
+      }
+      else if (strcmp(arg, "--nocore") == 0)
+      {
+        nocore= TRUE;
+      }
       else
         die("Unknown option: %s", arg);
     }
@@ -248,6 +253,11 @@ int main(int argc, const char** argv )
                               &jeli, sizeof(jeli)) == 0)
     message("SetInformationJobObject failed, continue anyway...");
 
+				/* Avoid popup box */
+  if (nocore)
+    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX
+                 | SEM_NOOPENFILEERRORBOX);
+
 #if 0
   /* Setup stdin, stdout and stderr redirect */
   si.dwFlags= STARTF_USESTDHANDLES;

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-05-15 12:57:51 +0000
+++ b/sql/mysqld.cc	2009-07-23 17:01:24 +0000
@@ -2103,15 +2103,14 @@ static void init_signals(void)
   win_install_sigabrt_handler();
   if(opt_console)
     SetConsoleCtrlHandler(console_event_handler,TRUE);
-  else
-  {
+
     /* Avoid MessageBox()es*/
-   _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
-   _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
-   _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
-   _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
-   _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
-   _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
 
    /*
      Do not use SEM_NOGPFAULTERRORBOX in the following SetErrorMode (),
@@ -2120,8 +2119,8 @@ static void init_signals(void)
      exception filter is not guaranteed to work in all situation
      (like heap corruption or stack overflow)
    */
-   SetErrorMode(SetErrorMode(0)|SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
-  }
+  SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS
+                               | SEM_NOOPENFILEERRORBOX);
   SetUnhandledExceptionFilter(my_unhandler_exception_filter);
 }
 


Attachment: [text/bzr-bundle] bzr/bjorn.munch@sun.com-20090723170124-2uxuxcio9dgziofj.bundle
Thread
bzr push into mysql-5.1-mtr branch (Bjorn.Munch:2808 to 2809) Bug#46212Bjorn Munch24 Jul