Changeset: 3ff13716c8b5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3ff13716c8b5
Modified Files:
        sql/backends/monet5/sql.mx
        sql/storage/bat/bat_storage.c
Branch: newstorage
Log Message:

fixed delete-related bug (affected rows)


diffs (47 lines):

diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -3638,7 +3638,7 @@ DELTAsub(bat *result, bat *col, bat *cid
                BBPunfix(u->batCacheid);
        }
 
-       if (i) {
+       /*if (i) {
                i = BATdescriptor(*ins);
                if (BATcount(u_id)) {
                        u_id = BATdescriptor(*uid);
@@ -3655,7 +3655,7 @@ DELTAsub(bat *result, bat *col, bat *cid
                BBPunfix(res->batCacheid);
                res = BATmirror(BATmark(u, 0));
                BBPunfix(u->batCacheid);
-       }
+       }*/
        BATkey(BATmirror(res),TRUE);
        BBPkeepref(*result = res->batCacheid);
        return MAL_SUCCEED;
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
@@ -1048,6 +1048,7 @@ delete_tab(sql_trans *tr, sql_table *t, 
                        c->data = timestamp_delta(oc->data, tr->stime);
                }
                        bat = c->data;
+
                if (bat->cached) {
                        bat_destroy(bat->cached);
                        bat->cached = NULL;
@@ -1097,12 +1098,13 @@ count_col(sql_trans *tr, sql_column *c, 
                c->data = timestamp_delta(oc->data, tr->stime);
        }
         b = c->data;
+
        if (!b)
                return 1;
        if (all)
                return b->cnt;
        else
-               return b->cnt;// - b->ibase;
+               return 0;
 }
 
 static size_t
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to