[libgda/LIBGDA_4.0] Fixed error overwriting problem



commit 83efdb5e3bef61d7f51b494e84478aa1434031fc
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Dec 16 19:35:56 2010 +0100

    Fixed error overwriting problem

 libgda/gda-util.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-util.c b/libgda/gda-util.c
index 1cfd31c..797a4fa 100644
--- a/libgda/gda-util.c
+++ b/libgda/gda-util.c
@@ -1012,7 +1012,7 @@ gda_compute_dml_statements (GdaConnection *cnc, GdaStatement *select_stmt, gbool
 			GDA_SQL_ANY_PART (ust->cond)->parent = GDA_SQL_ANY_PART (ust);
 	}
         
-	if (delete_stmt) {
+	if (retval && delete_stmt) {
 		sql_dst = gda_sql_statement_new (GDA_SQL_STATEMENT_DELETE);
 		dst = (GdaSqlStatementDelete*) sql_dst->contents;
 		g_assert (GDA_SQL_ANY_PART (dst)->type == GDA_SQL_ANY_STMT_DELETE);
@@ -1034,6 +1034,8 @@ gda_compute_dml_statements (GdaConnection *cnc, GdaStatement *select_stmt, gbool
 			GDA_SQL_ANY_PART (dst->cond)->parent = GDA_SQL_ANY_PART (dst);
 	}
 	g_free (tmp);
+	if (!retval)
+		goto cleanup;
 
 	GSList *expr_list;
 	gint colindex;



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