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 2e814d4702
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.
This commit is contained in:
Marko Mäkelä 2019-06-12 16:17:23 +03:00
parent 4bbd8be482
commit 94e665596d

View file

@ -21946,7 +21946,6 @@ ib_senderrf(
...) /*!< Args */
{
va_list args;
char* str = NULL;
const char* format = innobase_get_err_msg(code);
/* If the caller wants to push a message to the client then
@ -21959,7 +21958,7 @@ ib_senderrf(
va_start(args, code);
myf l = Sql_condition::WARN_LEVEL_NOTE;
myf l;
switch (level) {
case IB_LOG_LEVEL_INFO:
@ -21968,14 +21967,6 @@ ib_senderrf(
case IB_LOG_LEVEL_WARN:
l = ME_JUST_WARNING;
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:
l = 0;
break;
@ -21984,7 +21975,6 @@ ib_senderrf(
my_printv_error(code, format, MYF(l), args);
va_end(args);
free(str);
if (level == IB_LOG_LEVEL_FATAL) {
ut_error;