Commit 94e66559 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19740: Remove some broken InnoDB systemd code

GCC 9.1.1 noticed that sd_notifyf() was always being invoked with
str=NULL argument for "%s". This code was added in
commit 2e814d47
but not mentioned in the commit comment.

The STATUS messages for systemd matter during startup and shutdown,
and should not be emitted during normal operation.

ib_senderrf(): Remove the potentially harmful sd_notifyf() calls.
parent 4bbd8be4
...@@ -21946,7 +21946,6 @@ ib_senderrf( ...@@ -21946,7 +21946,6 @@ ib_senderrf(
...) /*!< Args */ ...) /*!< Args */
{ {
va_list args; va_list args;
char* str = NULL;
const char* format = innobase_get_err_msg(code); const char* format = innobase_get_err_msg(code);
/* If the caller wants to push a message to the client then /* If the caller wants to push a message to the client then
...@@ -21959,7 +21958,7 @@ ib_senderrf( ...@@ -21959,7 +21958,7 @@ ib_senderrf(
va_start(args, code); va_start(args, code);
myf l = Sql_condition::WARN_LEVEL_NOTE; myf l;
switch (level) { switch (level) {
case IB_LOG_LEVEL_INFO: case IB_LOG_LEVEL_INFO:
...@@ -21968,14 +21967,6 @@ ib_senderrf( ...@@ -21968,14 +21967,6 @@ ib_senderrf(
case IB_LOG_LEVEL_WARN: case IB_LOG_LEVEL_WARN:
l = ME_JUST_WARNING; l = ME_JUST_WARNING;
break; break;
case IB_LOG_LEVEL_ERROR:
sd_notifyf(0, "STATUS=InnoDB: Error: %s", str);
l = 0;
break;
case IB_LOG_LEVEL_FATAL:
l = 0;
sd_notifyf(0, "STATUS=InnoDB: Fatal: %s", str);
break;
default: default:
l = 0; l = 0;
break; break;
...@@ -21984,7 +21975,6 @@ ib_senderrf( ...@@ -21984,7 +21975,6 @@ ib_senderrf(
my_printv_error(code, format, MYF(l), args); my_printv_error(code, format, MYF(l), args);
va_end(args); va_end(args);
free(str);
if (level == IB_LOG_LEVEL_FATAL) { if (level == IB_LOG_LEVEL_FATAL) {
ut_error; ut_error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment