mirror of https://github.com/Icinga/icinga2.git
Merge pull request #5225 from Al2Klimov/bugfix/mysql_init-mysql_error-3664
Don't call mysql_error() after a failure of mysql_init() fixes #3664
This commit is contained in:
commit
dadc21e12a
|
@ -248,7 +248,7 @@ void IdoMysqlConnection::Reconnect(void)
|
||||||
/* connection */
|
/* connection */
|
||||||
if (!mysql_init(&m_Connection)) {
|
if (!mysql_init(&m_Connection)) {
|
||||||
Log(LogCritical, "IdoMysqlConnection")
|
Log(LogCritical, "IdoMysqlConnection")
|
||||||
<< "mysql_init() failed: \"" << mysql_error(&m_Connection) << "\"";
|
<< "mysql_init() failed: out of memory";
|
||||||
|
|
||||||
BOOST_THROW_EXCEPTION(std::bad_alloc());
|
BOOST_THROW_EXCEPTION(std::bad_alloc());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue