Skip to content

Commit 6da8a65

Browse files
committed
Bug #57274 SET GLOBAL debug crashes on Solaris in embedded server mode
(variables_debug fails) The problem was that "SET GLOBAL debug" could cause a crash on Solaris. The crash happened if the server failed to open the trace file given in the "SET GLOBAL debug" statement. This caused an error message to be printed to stderr containing the process name. However, printing to stderr crashed the server since the pointer to the process name had not been initialized. This patch fixes the problem by initializing the process name properly when doing "SET GLOBAL debug". No test case added as this bug was repeatable with existing test coverage in variables_debug.test.
1 parent a3357b5 commit 6da8a65

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dbug/dbug.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ void _db_set_init_(const char *control)
744744
CODE_STATE tmp_cs;
745745
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
746746
tmp_cs.stack= &init_settings;
747+
tmp_cs.process= db_process ? db_process : "dbug";
747748
DbugParse(&tmp_cs, control);
748749
}
749750

0 commit comments

Comments
 (0)