[libgda/LIBGDA_4.0] Correction for bug #633247



commit d1fcf60c9ce82488c2ca1f0ab77e23e022a78651
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Oct 28 21:14:50 2010 +0200

    Correction for bug #633247

 libgda/gda-data-handler.c            |    3 ++-
 libgda/handlers/gda-handler-string.c |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libgda/gda-data-handler.c b/libgda/gda-data-handler.c
index 15ee2cb..7bfee1b 100644
--- a/libgda/gda-data-handler.c
+++ b/libgda/gda-data-handler.c
@@ -75,7 +75,8 @@ gda_data_handler_iface_init (gpointer g_class)
  * to use variables in statements instead of value literals, see
  * the <link linkend="GdaSqlParser.description">GdaSqlParser</link> for more information.
  *
- * If the value is NULL or is of type GDA_TYPE_NULL, the returned string is "NULL".
+ * If the value is NULL or is of type GDA_TYPE_NULL,
+ * or is a G_TYPE_STRING and g_value_get_string() returns %NULL, the returned string is "NULL".
  *
  * Returns: the new string, or %NULL if an error occurred
  */
diff --git a/libgda/handlers/gda-handler-string.c b/libgda/handlers/gda-handler-string.c
index 4ede2c9..e759900 100644
--- a/libgda/handlers/gda-handler-string.c
+++ b/libgda/handlers/gda-handler-string.c
@@ -225,7 +225,7 @@ gda_handler_string_get_sql_from_value (GdaDataHandler *iface, const GValue *valu
 		g_free (str);
 	}
 	else
-		retval = g_strdup ("''");
+		retval = g_strdup ("NULL");
 
 	return retval;
 }



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