[libgda] gda_sql_builder_select_order_by(): Treat empty collation like null.



commit 9b20a1c9b5c2246f256c2949ae05e2bf13449cf9
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon May 17 16:18:26 2010 +0200

    gda_sql_builder_select_order_by(): Treat empty collation like null.

 libgda/gda-sql-builder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-sql-builder.c b/libgda/gda-sql-builder.c
index 9869357..136f75c 100644
--- a/libgda/gda-sql-builder.c
+++ b/libgda/gda-sql-builder.c
@@ -1298,7 +1298,7 @@ gda_sql_builder_select_order_by (GdaSqlBuilder *builder, guint expr_id,
 	sorder = gda_sql_select_order_new (GDA_SQL_ANY_PART (sel));
 	sorder->expr = (GdaSqlExpr*) use_part (part, GDA_SQL_ANY_PART (sorder));
 	sorder->asc = asc;
-	if (collation_name)
+	if (collation_name && *collation_name)
 		sorder->collation_name = g_strdup (collation_name);
 	sel->order_by = g_slist_append (sel->order_by, sorder);
 }



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