summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2005-05-06 10:43:29 +0200
committerunknown <stewart@mysql.com>2005-05-06 10:43:29 +0200
commit8b49ccace4bff3348b9e5eea33473879335bb39f (patch)
tree85d631edbbe2dff5109f22471d3ca3374301e4e5 /ndb
parentc758512a9176b40532f8431e7771f8dbeed77111 (diff)
downloadmariadb-git-8b49ccace4bff3348b9e5eea33473879335bb39f.tar.gz
Bug#10193
Invalid DataDir in config causes ndbd segfault ndb/src/kernel/error/ErrorReporter.cpp: print error and return error if unable to open the file for error reporting.
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/kernel/error/ErrorReporter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ndb/src/kernel/error/ErrorReporter.cpp b/ndb/src/kernel/error/ErrorReporter.cpp
index 35cd3f099d9..7c77e7932ee 100644
--- a/ndb/src/kernel/error/ErrorReporter.cpp
+++ b/ndb/src/kernel/error/ErrorReporter.cpp
@@ -237,6 +237,11 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID,
// Create a new file, and skip the first 69 bytes,
// which are info about the current offset
stream = fopen(theErrorFileName, "w");
+ if(stream == NULL)
+ {
+ fprintf(stderr,"Unable to open error log file: %s\n", theErrorFileName);
+ return -1;
+ }
fprintf(stream, "%s%u%s", "Current byte-offset of file-pointer is: ", 69,
" \n\n\n");