Date: Wednesday, January 11, 2006 @ 12:51:42
  Author: zsolt
    Path: /cvsroot/carob/libmysequoia/src

Modified: CarobStmt.cpp (1.5 -> 1.6) MySQLAPI.cpp (1.25 -> 1.26)

Implemented mysql_stmt_affected_rows


---------------+
 CarobStmt.cpp |    5 ++++-
 MySQLAPI.cpp  |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)


Index: libmysequoia/src/CarobStmt.cpp
diff -u libmysequoia/src/CarobStmt.cpp:1.5 libmysequoia/src/CarobStmt.cpp:1.6
--- libmysequoia/src/CarobStmt.cpp:1.5  Wed Jan 11 12:37:54 2006
+++ libmysequoia/src/CarobStmt.cpp      Wed Jan 11 12:51:42 2006
@@ -226,7 +226,9 @@
 */
             }
         }
-        c_stmt->execute();
+        if (!c_stmt->execute())
+          m_stmt->affected_rows = c_stmt->getUpdateCount();
+
         result = 0;
       }
       catch (CarobException &e)
@@ -309,4 +311,5 @@
   m_stmt->last_errno = 0;
   *m_stmt->last_error = 0;
   *m_stmt->sqlstate = 0;
+  m_stmt->affected_rows = 0;
 }
Index: libmysequoia/src/MySQLAPI.cpp
diff -u libmysequoia/src/MySQLAPI.cpp:1.25 libmysequoia/src/MySQLAPI.cpp:1.26
--- libmysequoia/src/MySQLAPI.cpp:1.25  Wed Jan 11 12:37:54 2006
+++ libmysequoia/src/MySQLAPI.cpp       Wed Jan 11 12:51:42 2006
@@ -1221,8 +1221,9 @@
 mysql_stmt_affected_rows (MYSQL_STMT * stmt)
 {
   LOG4CXX_DEBUG(logger, "Entering mysql_stmt_affected_rows.");
+  my_ulonglong result = stmt ? stmt->affected_rows : 0;
   LOG4CXX_DEBUG(logger, "Leaving mysql_stmt_affected_rows.");
-  return 0;
+  return result;
 }
 
 my_bool

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to