summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-10-19 10:19:57 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-10-19 10:19:57 +0200
commit4776282bede4da8cceeee1ce450310b281e34af9 (patch)
treeb1749fb9f7d2ba533b555c5fed978b70eb0d95fd /dbug
parentaf665ea977698676080f0e175363dc0c83755938 (diff)
downloadmariadb-git-4776282bede4da8cceeee1ce450310b281e34af9.tar.gz
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.
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index e5e11d5be00..fecdd4f8a6c 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -744,6 +744,7 @@ void _db_set_init_(const char *control)
CODE_STATE tmp_cs;
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
tmp_cs.stack= &init_settings;
+ tmp_cs.process= db_process ? db_process : "dbug";
DbugParse(&tmp_cs, control);
}