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:
Gunnar Beutner 2017-05-04 14:58:55 +02:00 committed by GitHub
commit dadc21e12a
1 changed files with 1 additions and 1 deletions

View File

@ -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());
} }