Changeset: 2a9590f2e540 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2a9590f2e540 Modified Files: sql/backends/monet5/rel_bin.c Branch: newstorage Log Message:
claim just before the appends diffs (26 lines): diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -3056,17 +3056,18 @@ rel2bin_insert( mvc *sql, sql_rel *rel, if (!insert) return NULL; - l = list_append(l, stmt_list(sql->sa, newl)); if (constraint) sql_insert_check_null(sql, t, newl, l); - if (!sql_insert_triggers(sql, t, l)) - return sql_error(sql, 02, "INSERT INTO: triggers failed for table '%s'", t->base.name); + if (insert->op1->nrcols == 0) { s = stmt_atom_wrd(sql->sa, 1); } else { s = stmt_aggr(sql->sa, insert->op1, NULL, NULL, sql_bind_aggr(sql->sa, sql->session->schema, "count", NULL), 1, 0); } - list_prepend(l, stmt_claim(sql->sa, t, s)); + list_prepend(newl, stmt_claim(sql->sa, t, s)); + l = list_append(l, stmt_list(sql->sa, newl)); + if (!sql_insert_triggers(sql, t, l)) + return sql_error(sql, 02, "INSERT INTO: triggers failed for table '%s'", t->base.name); if (ddl) list_prepend(l, ddl); else _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list