Changeset: d8c7c3be30eb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d8c7c3be30eb Modified Files: sql/storage/bat/bat_table.c Branch: Oct2014 Log Message:
fixed crash in alter set not null diffs (37 lines): diff --git a/sql/storage/bat/bat_table.c b/sql/storage/bat/bat_table.c --- a/sql/storage/bat/bat_table.c +++ b/sql/storage/bat/bat_table.c @@ -87,7 +87,6 @@ delta_full_bat_( sql_trans *tr, sql_colu if (temp) return r; b = temp_descriptor(bat->bid); - u = temp_descriptor(bat->ubid); if (!b) { b = i; } else { @@ -100,15 +99,18 @@ delta_full_bat_( sql_trans *tr, sql_colu } bat_destroy(i); } - if (BATcount(u)) { - if (needcopy) { - r = BATcopy(b, b->htype, b->ttype, 1, TRANSIENT); - bat_destroy(b); - b = r; + if (bat->ubid && bat->ucnt) { + u = temp_descriptor(bat->ubid); + if (BATcount(u)) { + if (needcopy) { + r = BATcopy(b, b->htype, b->ttype, 1, TRANSIENT); + bat_destroy(b); + b = r; + } + BATreplace(b, u, TRUE); } - BATreplace(b, u, TRUE); + bat_destroy(u); } - bat_destroy(u); (void)c; if (!bat->cached && !tr->parent) bat->cached = temp_descriptor(b->batCacheid); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list