[libgda/LIBGDA_4.2] MySQL provider: correct the IMPACTED_ROWS returned value



commit 26342f6b802e60516b066cd1c505758cf9736e40
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sat Mar 26 12:40:34 2011 +0100

    MySQL provider: correct the IMPACTED_ROWS returned value
    
    specifically use the CLIENT_FOUND_ROWS flag when opening the connection
    so that mysql_affected_rows() returns the number of matched rows instead
    of the number of modified rows, to have a coherent hehaviour with
    other providers

 providers/mysql/gda-mysql-provider.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/providers/mysql/gda-mysql-provider.c b/providers/mysql/gda-mysql-provider.c
index 4ce5a54..526483c 100644
--- a/providers/mysql/gda-mysql-provider.c
+++ b/providers/mysql/gda-mysql-provider.c
@@ -472,7 +472,7 @@ real_open_connection (const gchar  *host,
 		      gboolean      compress,
 		      GError      **error)
 {
-	unsigned int flags = 0;
+	unsigned int flags = CLIENT_FOUND_ROWS;
 
 	/* Exclusive: host/pair otherwise unix socket. */
 	if ((host || port > 0) && socket) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]