[libgda/gtk3] Correction for bug #633247



commit a4ea45040521cd80dc8538bf03d0f8b4fd658577
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 585392e..11b7319 100644
--- a/libgda/gda-data-handler.c
+++ b/libgda/gda-data-handler.c
@@ -76,7 +76,8 @@ gda_data_handler_iface_init (G_GNUC_UNUSED 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: (transfer full): 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 ef3e583..1b90538 100644
--- a/libgda/handlers/gda-handler-string.c
+++ b/libgda/handlers/gda-handler-string.c
@@ -226,7 +226,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]