Date: Friday, January 13, 2006 @ 14:59:34
  Author: zsolt
    Path: /cvsroot/carob/libmysequoia/src

Modified: CarobStmt.cpp (1.9 -> 1.10)

- mysql_stmt_num_rows() and mysql_stmt_affected_rows() now will return the 
number of rows fetched from the server.
- corrected the error returned by the CarobStmt::fetch() function in case of 
data truncation


---------------+
 CarobStmt.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: libmysequoia/src/CarobStmt.cpp
diff -u libmysequoia/src/CarobStmt.cpp:1.9 libmysequoia/src/CarobStmt.cpp:1.10
--- libmysequoia/src/CarobStmt.cpp:1.9  Fri Jan 13 10:01:08 2006
+++ libmysequoia/src/CarobStmt.cpp      Fri Jan 13 14:59:34 2006
@@ -392,13 +392,18 @@
           if (!m_stmt->result.data)
             delete_fetch_field(fPtr, buffer);
 
-          if (*m_stmt->bind->error)
+          if (*bPtr->error)
             result = MYSQL_DATA_TRUNCATED;
         }
       }
       
       if (m_stmt->result.data)
         m_stmt->data_cursor = m_stmt->data_cursor->next;
+      else
+      {
+        m_stmt->result.rows++;
+        m_stmt->affected_rows = m_stmt->result.rows;
+      }
     }
     else
       result = MYSQL_NO_DATA;

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

Reply via email to