Changeset: e2db90ad996c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2db90ad996c
Modified Files:
        sql/storage/bat/bat_storage.c
Branch: Jun2016
Log Message:

make sure we cleanup old delta-data before (over) writing with new.


diffs (31 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
@@ -1106,7 +1106,7 @@ create_col(sql_trans *tr, sql_column *c)
        int type = c->type.type->localtype;
        sql_delta *bat = c->data;
 
-       if (!bat) {
+       if (!bat || !c->base.allocated) {
                c->data = bat = ZNEW(sql_delta);
                bat->wtime = c->base.wtime = tr->wstime;
                c->base.allocated = 1;
@@ -1177,7 +1177,7 @@ create_idx(sql_trans *tr, sql_idx *ni)
        if (ni->type == join_idx)
                type = TYPE_oid;
 
-       if (!bat) {
+       if (!bat || !ni->base.allocated) {
                ni->data = bat = ZNEW(sql_delta);
                bat->wtime = ni->base.wtime = tr->wstime;
                ni->base.allocated = 1;
@@ -1896,6 +1896,9 @@ tr_update_delta( sql_trans *tr, sql_delt
        if (obat->bid)
                cur = temp_descriptor(obat->bid);
        if (!obat->bid && tr != gtrans) {
+               //if (obat->name)
+                       destroy_delta(obat);
+                       //_DELETE(obat->name);
                *obat = *cbat;
                cbat->bid = 0;
                cbat->ibid = 0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to