Changeset: 48ae3d12100f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/48ae3d12100f Modified Files: sql/storage/bat/bat_storage.c Branch: default Log Message:
Replace loop with GDK operator. diffs (26 lines): diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -2314,15 +2314,13 @@ delta_append_val(sql_trans *tr, sql_delt if (cnt) { if (BATcount(b) < offset) { /* add space */ const void *tv = ATOMnilptr(b->ttype); - lng j, d = offset - BATcount(b); - for(j=0;j<d;j++) { - if (BUNappend(b, tv, true) != GDK_SUCCEED) { - bat_destroy(b); - if (i != oi) - GDKfree(i); - unlock_column(tr->store, id); - return LOG_ERR; - } + lng d = offset - BATcount(b); + if (BUNappendmulti(b, tv, d, true) != GDK_SUCCEED) { + bat_destroy(b); + if (i != oi) + GDKfree(i); + unlock_column(tr->store, id); + return LOG_ERR; } } if (BUNappendmulti(b, i, cnt, true) != GDK_SUCCEED) { _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org