Changeset: 9909a064c056 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9909a064c056 Modified Files: sql/backends/monet5/sql_scenario.c Branch: Feb2013 Log Message:
Stop execution in SQLstatementIntern if there is a failure. Niels: is this correct? One of the problems this solves is a memory leak if there is a failure during execution. The msg variable is then never freed. By checking for it, the value is used and (eventually) freed. diffs (12 lines): diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -1003,7 +1003,7 @@ SQLstatementIntern(Client c, str *expr, * Scan the complete string for SQL statements, stop at the first error. */ c->sqlcontext = sql; - while( m->scanner.rs->pos < m->scanner.rs->len ){ + while( msg == MAL_SUCCEED && m->scanner.rs->pos < m->scanner.rs->len ){ sql_rel *r; stmt *s; int oldvtop, oldstop; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list