Don't call mysql_error() after a failure of mysql_init()

refs #3664
This commit is contained in:
Alexander A. Klimov 2017-05-04 12:22:34 +02:00
parent 2932651b64
commit 0da226163f

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