[libgda] MySQL provider: correct the IMPACTED_ROWS returned value



commit 6aff562cdcbd05f022c6cbacf1a53775cfe027c5
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 64b8266..957a5d0 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]