mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-17093: SOURCE_REVISION in log and handle_fatal_signal
MariaDB MDEV-12583 added `SOURCE_REVISION` variable that exposes the SHA1 of source code commit that the current running engine was built from. This info is useful for troubleshooting and debugging. This commit does the following: - addes the `SOURCE_REVISION` value into engine error log. - when a crash triggers handle_fatal_signal, the `SOURCE_REVISION` will be included in crash report. - resolves MDEV-20344: startup messages belong in stderr/error-log not stdout All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "mysqld.h"
|
||||
#include "sql_class.h"
|
||||
#include "my_stacktrace.h"
|
||||
#include <source_revision.h>
|
||||
|
||||
#ifdef __WIN__
|
||||
#include <crtdbg.h>
|
||||
@ -177,7 +178,8 @@ extern "C" sig_handler handle_fatal_signal(int sig)
|
||||
"something is definitely wrong and this may fail.\n\n");
|
||||
|
||||
set_server_version(server_version, sizeof(server_version));
|
||||
my_safe_printf_stderr("Server version: %s\n", server_version);
|
||||
my_safe_printf_stderr("Server version: %s source revision: %s\n",
|
||||
server_version, SOURCE_REVISION);
|
||||
|
||||
if (dflt_key_cache)
|
||||
my_safe_printf_stderr("key_buffer_size=%lu\n",
|
||||
|
Reference in New Issue
Block a user