From d36118272a287a77f876c51f00c042c6c98cfcdc Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 10 Jul 2016 05:04:57 +0300 Subject: [PATCH] Minor fix in mysql module when executing update queries. --- modules/mysql/Handle/Connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mysql/Handle/Connection.cpp b/modules/mysql/Handle/Connection.cpp index 572bbd64..6056c5b3 100644 --- a/modules/mysql/Handle/Connection.cpp +++ b/modules/mysql/Handle/Connection.cpp @@ -199,7 +199,7 @@ Uint64 ConnHnd::Execute(CSStr query, Ulong size) // Sum the number of affected rows by this statement affected += mysql_affected_rows(mPtr); } - else + else if (mysql_errno(mPtr) != 0) { SQMOD_THROW_CURRENT(*this, "Unable to count affected rows"); } @@ -222,4 +222,4 @@ Uint64 ConnHnd::Execute(CSStr query, Ulong size) return affected; } -} // Namespace:: SqMod \ No newline at end of file +} // Namespace:: SqMod