From 39e92dfe2d713f2ccf85768db94209c36be41c98 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 28 Sep 2015 13:19:13 +0200 Subject: [PATCH] Fix incorrect value for IdoMysqlConnection::m_AffectedRows refs #10190 --- lib/db_ido/dbconnection.cpp | 4 ++-- lib/db_ido_mysql/idomysqlconnection.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/db_ido/dbconnection.cpp b/lib/db_ido/dbconnection.cpp index f2b6b90af..eebf0056a 100644 --- a/lib/db_ido/dbconnection.cpp +++ b/lib/db_ido/dbconnection.cpp @@ -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"); diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index 95dd45183..3f703f088 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -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) {