From 679923afd0206f122a4063055165fcd74a1913b6 Mon Sep 17 00:00:00 2001
From: Steven Murray <Steven.Murray@cern.ch>
Date: Thu, 4 Jul 2019 18:00:21 +0200
Subject: [PATCH] MysqlConn constructor now sets the CLIENT_FOUND_ROWS flag so
 that the reported number of rows affected by a DML statement matches that of
 Oracle, PostgreSQL and SQLite

---
 rdbms/wrapper/MysqlConn.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rdbms/wrapper/MysqlConn.cpp b/rdbms/wrapper/MysqlConn.cpp
index 188ecc28b5..89572b3e95 100644
--- a/rdbms/wrapper/MysqlConn.cpp
+++ b/rdbms/wrapper/MysqlConn.cpp
@@ -61,7 +61,7 @@ MysqlConn::MysqlConn(const std::string& host,
 
   if (mysql_real_connect(m_mysqlConn, host.c_str(),
                          user.c_str(), passwd.c_str(), db.c_str(), port, 
-                         NULL, 0) == NULL) {
+                         NULL, CLIENT_FOUND_ROWS) == NULL) {
     unsigned int rc = mysql_errno(m_mysqlConn);
     std::string msg = mysql_error(m_mysqlConn);
     throw exception::Exception(std::string(" errno: ") + std::to_string(rc) + " " +  msg);
-- 
GitLab