Changeset: b14a49adb236 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b14a49adb236
Modified Files:
        sql/backends/monet5/sql_time.c
        tools/monetdbe/monetdbe.c
Branch: Jul2021
Log Message:

Unfix after reading properties. Cleanup


diffs (147 lines):

diff --git a/sql/backends/monet5/sql_time.c b/sql/backends/monet5/sql_time.c
--- a/sql/backends/monet5/sql_time.c
+++ b/sql/backends/monet5/sql_time.c
@@ -112,10 +112,6 @@ daytime_2time_daytime(Client cntxt, MalB
        }
 
 bailout:
-       if (b)
-               BBPunfix(b->batCacheid);
-       if (s)
-               BBPunfix(s->batCacheid);
        if (res && !msg) {
                BATsetcount(res, q);
                res->tnil = nils;
@@ -126,6 +122,10 @@ bailout:
                BBPkeepref(*r = res->batCacheid);
        } else if (res)
                BBPreclaim(res);
+       if (b)
+               BBPunfix(b->batCacheid);
+       if (s)
+               BBPunfix(s->batCacheid);
        return msg;
 }
 
@@ -603,10 +603,6 @@ date_2_timestamp(Client cntxt, MalBlkPtr
        }
 
 bailout:
-       if (b)
-               BBPunfix(b->batCacheid);
-       if (s)
-               BBPunfix(s->batCacheid);
        if (res && !msg) {
                BATsetcount(res, q);
                res->tnil = nils;
@@ -617,6 +613,10 @@ bailout:
                BBPkeepref(*r = res->batCacheid);
        } else if (res)
                BBPreclaim(res);
+       if (b)
+               BBPunfix(b->batCacheid);
+       if (s)
+               BBPunfix(s->batCacheid);
        return msg;
 }
 
@@ -724,10 +724,6 @@ timestamp_2time_timestamp(Client cntxt, 
        }
 
 bailout:
-       if (b)
-               BBPunfix(b->batCacheid);
-       if (s)
-               BBPunfix(s->batCacheid);
        if (res && !msg) {
                BATsetcount(res, q);
                res->tnil = nils;
@@ -738,6 +734,10 @@ bailout:
                BBPkeepref(*r = res->batCacheid);
        } else if (res)
                BBPreclaim(res);
+       if (b)
+               BBPunfix(b->batCacheid);
+       if (s)
+               BBPunfix(s->batCacheid);
        return msg;
 }
 
@@ -1276,10 +1276,6 @@ bailout1:
        bat_iterator_end(&bi);
 
 bailout:
-       if (b)
-               BBPunfix(b->batCacheid);
-       if (s)
-               BBPunfix(s->batCacheid);
        if (res && !msg) {
                BATsetcount(res, q);
                res->tnil = nils;
@@ -1290,6 +1286,10 @@ bailout:
                BBPkeepref(*r = res->batCacheid);
        } else if (res)
                BBPreclaim(res);
+       if (b)
+               BBPunfix(b->batCacheid);
+       if (s)
+               BBPunfix(s->batCacheid);
        return msg;
 }
 
@@ -1405,10 +1405,6 @@ bailout1:
        bat_iterator_end(&bi);
 
 bailout:
-       if (b)
-               BBPunfix(b->batCacheid);
-       if (s)
-               BBPunfix(s->batCacheid);
        if (res && !msg) {
                BATsetcount(res, q);
                res->tnil = nils;
@@ -1419,6 +1415,10 @@ bailout:
                BBPkeepref(*r = res->batCacheid);
        } else if (res)
                BBPreclaim(res);
+       if (b)
+               BBPunfix(b->batCacheid);
+       if (s)
+               BBPunfix(s->batCacheid);
        return msg;
 }
 
@@ -1514,10 +1514,6 @@ second_interval_daytime(Client cntxt, Ma
        }
 
 bailout:
-       if (b)
-               BBPunfix(b->batCacheid);
-       if (s)
-               BBPunfix(s->batCacheid);
        if (res && !msg) {
                BATsetcount(res, q);
                res->tnil = nils;
@@ -1528,6 +1524,10 @@ bailout:
                BBPkeepref(*r = res->batCacheid);
        } else if (res)
                BBPreclaim(res);
+       if (b)
+               BBPunfix(b->batCacheid);
+       if (s)
+               BBPunfix(s->batCacheid);
        return msg;
 }
 
diff --git a/tools/monetdbe/monetdbe.c b/tools/monetdbe/monetdbe.c
--- a/tools/monetdbe/monetdbe.c
+++ b/tools/monetdbe/monetdbe.c
@@ -2414,7 +2414,7 @@ remote_cleanup:
 
 cleanup:
        if (pos)
-               BBPunfix(pos->batCacheid);
+               BBPreclaim(pos);
        mdbe->msg = commit_action(m, mdbe, NULL, NULL);
        return mdbe->msg;
 }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to