Changeset: 613cc9d8f38b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/613cc9d8f38b
Modified Files:
sql/storage/bat/bat_table.c
Branch: default
Log Message:
When fully materializing column, bind update bats in the single call
diffs (44 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
@@ -33,24 +33,17 @@ full_column(sql_trans *tr, sql_column *c
b := b.replace(u);
*/
sqlstore *store = tr->store;
- BAT *b = store->storage_api.bind_col(tr, c, RDONLY);
- BAT *ui = store->storage_api.bind_col(tr, c, RD_UPD_ID);
+ BAT *b = store->storage_api.bind_col(tr, c, RDONLY), *ui = NULL, *uv =
NULL;
+ int res = store->storage_api.bind_updates(tr, c, &ui, &uv);
- if (!b || !ui) {
+ if (!b || !ui || !uv || res == LOG_ERR) {
bat_destroy(b);
bat_destroy(ui);
+ bat_destroy(uv);
return NULL;
}
if (BATcount(ui)) {
- BAT *uv = store->storage_api.bind_col(tr, c, RD_UPD_VAL), *r;
-
- if (!uv) {
- bat_destroy(b);
- bat_destroy(ui);
- return NULL;
- }
-
- r = COLcopy(b, b->ttype, true, TRANSIENT);
+ BAT *r = COLcopy(b, b->ttype, true, TRANSIENT);
bat_destroy(b);
b = r;
if (!b || BATreplace(b, ui, uv, true) != GDK_SUCCEED) {
@@ -59,9 +52,9 @@ full_column(sql_trans *tr, sql_column *c
bat_destroy(uv);
return NULL;
}
- bat_destroy(uv);
}
bat_destroy(ui);
+ bat_destroy(uv);
return b;
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]