diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-12 16:17:23 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-12 16:25:55 +0300 |
commit | 94e665596d13191da49c12469178a44d9ebae82a (patch) | |
tree | 45d6c54b9b0c73537388020f744a5abc5719d1a7 /storage | |
parent | 4bbd8be482929984b9dceb077187d0fdbbcde4f0 (diff) | |
download | mariadb-git-94e665596d13191da49c12469178a44d9ebae82a.tar.gz |
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 2e814d4702d71a04388386a9f591d14a35980bfe
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.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a511a3d175e..26a138046b4 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -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; |