Fix incorrect value for IdoMysqlConnection::m_AffectedRows

refs #10190
This commit is contained in:
Gunnar Beutner 2015-09-28 13:19:13 +02:00 committed by Michael Friedrich
parent f0bdd4cf21
commit 39e92dfe2d
2 changed files with 4 additions and 4 deletions

View File

@ -378,8 +378,8 @@ void DbConnection::PrepareDatabase(void)
//ClearConfigTable("contactgroups");
//ClearConfigTable("contacts");
//ClearConfigTable("contactstatus");
ClearConfigTable("customvariables");
ClearConfigTable("customvariablestatus");
//ClearConfigTable("customvariables");
//ClearConfigTable("customvariablestatus");
//ClearConfigTable("endpoints");
//ClearConfigTable("endpointstatus");
ClearConfigTable("host_contactgroups");

View File

@ -381,9 +381,9 @@ IdoMysqlResult IdoMysqlConnection::Query(const String& query)
);
}
m_AffectedRows = mysql_affected_rows(&m_Connection);
MYSQL_RES *result = mysql_store_result(&m_Connection);
MYSQL_RES *result = mysql_use_result(&m_Connection);
m_AffectedRows = mysql_affected_rows(&m_Connection);
if (!result) {
if (mysql_field_count(&m_Connection) > 0) {