Changeset: 41bbe3b84f42 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=41bbe3b84f42
Modified Files:
monetdb5/modules/atoms/batxml.c
monetdb5/modules/kernel/algebra.c
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/batcolor.c
monetdb5/modules/kernel/batmmath.c
monetdb5/modules/kernel/batstr.c
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/kernel/status.c
monetdb5/modules/mal/bbp.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/inspect.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/zorder.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_cast_impl_down_from_int.h
sql/backends/monet5/sql_cast_impl_up_to_flt.h
sql/backends/monet5/sql_cast_impl_up_to_int.h
Branch: default
Log Message:
Remove legacy code
diffs (truncated from 737 to 300 lines):
diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c
--- a/monetdb5/modules/atoms/batxml.c
+++ b/monetdb5/modules/atoms/batxml.c
@@ -74,8 +74,6 @@ mal_export str AGGRsubxml(bat *retval, c
#define finalizeResult(X,Y,Z) \
do {
\
BATsetcount((Y), (Y)->batCount); \
- if (!((Y)->batDirty & 2)) \
- BATsetaccess((Y), BAT_READ); \
*(X) = (Y)->batCacheid; \
BBPkeepref(*(X));
\
BBPunfix((Z)->batCacheid); \
diff --git a/monetdb5/modules/kernel/algebra.c
b/monetdb5/modules/kernel/algebra.c
--- a/monetdb5/modules/kernel/algebra.c
+++ b/monetdb5/modules/kernel/algebra.c
@@ -202,7 +202,6 @@ ALGgroupby(bat *res, const bat *gids, co
throw(MAL, "algebra.groupby",GDK_EXCEPTION);
}
if( bn){
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*res = bn->batCacheid;
BBPkeepref(bn->batCacheid);
}
@@ -261,7 +260,6 @@ ALGsubselect2(bat *result, const bat *bi
BBPunfix(s->batCacheid);
if (bn == NULL)
throw(MAL, "algebra.subselect", GDK_EXCEPTION);
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(bn->batCacheid);
return MAL_SUCCEED;
@@ -292,7 +290,6 @@ ALGthetasubselect2(bat *result, const ba
BBPunfix(s->batCacheid);
if (bn == NULL)
throw(MAL, "algebra.subselect", GDK_EXCEPTION);
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(bn->batCacheid);
return MAL_SUCCEED;
@@ -323,7 +320,6 @@ ALGselectNotNil(bat *result, const bat *
}
BBPunfix(b->batCacheid);
if (bn) {
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(*result);
return MAL_SUCCEED;
@@ -404,13 +400,9 @@ do_join(bat *r1, bat *r2, const bat *lid
result2 = NULL;
}
*r1 = result1->batCacheid;
- if (!(result1->batDirty&2))
- BATsetaccess(result1, BAT_READ);
BBPkeepref(*r1);
if (r2) {
*r2 = result2->batCacheid;
- if (!(result2->batDirty&2))
- BATsetaccess(result2, BAT_READ);
BBPkeepref(*r2);
}
BBPunfix(left->batCacheid);
@@ -593,8 +585,6 @@ ALGunary(bat *result, const bat *bid, BA
BBPunfix(b->batCacheid);
if (bn == NULL)
throw(MAL, name, GDK_EXCEPTION);
- if (!(bn->batDirty&2))
- BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(*result);
return MAL_SUCCEED;
@@ -617,8 +607,6 @@ ALGbinary(bat *result, const bat *lid, c
BBPunfix(right->batCacheid);
if (bn == NULL)
throw(MAL, name, GDK_EXCEPTION);
- if (!(bn->batDirty&2))
- BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(*result);
return MAL_SUCCEED;
@@ -654,8 +642,6 @@ ALGsubunique2(bat *result, const bat *bi
BBPunfix(s->batCacheid);
if (bn == NULL)
throw(MAL, "algebra.subunique", GDK_EXCEPTION);
- if (!(bn->batDirty & 2))
- BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(*result);
return MAL_SUCCEED;
@@ -837,7 +823,6 @@ ALGtmark(bat *result, const bat *bid, co
bn = BATdense(b->hseqbase, *base, BATcount(b));
if (bn != NULL) {
BBPunfix(b->batCacheid);
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*result = bn->batCacheid;
BBPkeepref(*result);
return MAL_SUCCEED;
@@ -880,7 +865,6 @@ ALGslice(bat *ret, const bat *bid, const
throw(MAL, "algebra.slice", RUNTIME_OBJECT_MISSING);
}
if (slice(&bn, b, *start, *end) == GDK_SUCCEED) {
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*ret = bn->batCacheid;
BBPkeepref(*ret);
BBPunfix(b->batCacheid);
@@ -1073,8 +1057,6 @@ ALGprojecttail(Client cntxt, MalBlkPtr m
*ret = bat_nil;
throw(MAL, "algebra.project", MAL_MALLOC_FAIL);
}
- if (!(bn->batDirty&2))
- BATsetaccess(bn, BAT_READ);
*ret= bn->batCacheid;
BBPkeepref(bn->batCacheid);
BBPunfix(b->batCacheid);
diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c
--- a/monetdb5/modules/kernel/bat5.c
+++ b/monetdb5/modules/kernel/bat5.c
@@ -1131,7 +1131,6 @@ BKCshrinkBAT(bat *ret, const bat *bid, c
bn->tnonil = b->tnonil;
bn->tnil = b->tnil;
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPunfix(b->batCacheid);
BBPunfix(bs->batCacheid);
@@ -1188,7 +1187,6 @@ BKCshrinkBATmap(bat *ret, const bat *bid
bn->trevsorted = 0;
bn->tdense = 0;
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPunfix(b->batCacheid);
BBPunfix(bs->batCacheid);
@@ -1304,7 +1302,6 @@ BKCreuseBAT(bat *ret, const bat *bid, co
bn->tdense = 0;
bn->tkey = b->tkey;
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPunfix(b->batCacheid);
BBPunfix(bs->batCacheid);
@@ -1366,7 +1363,6 @@ BKCreuseBATmap(bat *ret, const bat *bid,
bn->trevsorted = 0;
bn->tdense = 0;
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPunfix(b->batCacheid);
BBPunfix(bs->batCacheid);
diff --git a/monetdb5/modules/kernel/batcolor.c
b/monetdb5/modules/kernel/batcolor.c
--- a/monetdb5/modules/kernel/batcolor.c
+++ b/monetdb5/modules/kernel/batcolor.c
@@ -56,8 +56,6 @@ str CLRbat##NAME(bat *ret, const bat *l)
FUNC(yp,x);
\
bunfastapp(bn, yp);
\
}
\
- if (!(bn->batDirty & 2))
\
- BATsetaccess(bn, BAT_READ);
\
*ret = bn->batCacheid;
\
BBPkeepref(*ret);
\
BBPunfix(b->batCacheid);
\
@@ -138,8 +136,6 @@ str CLRbat##NAME(bat *ret, const bat *l,
FUNC(yp,x,x2,x3);
\
bunfastapp(bn, yp);
\
}
\
- if (!(bn->batDirty & 2))
\
- BATsetaccess(bn, BAT_READ);
\
*ret = bn->batCacheid;
\
BBPkeepref(*ret);
\
BBPunfix(b->batCacheid);
\
diff --git a/monetdb5/modules/kernel/batmmath.c
b/monetdb5/modules/kernel/batmmath.c
--- a/monetdb5/modules/kernel/batmmath.c
+++ b/monetdb5/modules/kernel/batmmath.c
@@ -74,8 +74,6 @@ str CMDscience_bat_##TYPE##_##FUNC(bat *
bn->tnil = b->tnil;
\
bn->tnonil = b->tnonil;
\
BATkey(bn, 0);
\
- if (!(bn->batDirty&2))
\
- BATsetaccess(bn, BAT_READ);
\
BBPkeepref(*ret = bn->batCacheid);
\
BBPunfix(b->batCacheid);
\
return MAL_SUCCEED;
\
@@ -119,8 +117,6 @@ str CMDscience_bat_cst_##FUNC##_##TYPE(b
bn->tnil = b->tnil;
\
bn->tnonil = b->tnonil;
\
BATkey(bn,0);
\
- if (!(bn->batDirty&2))
\
- BATsetaccess(bn, BAT_READ);
\
BBPkeepref(*ret = bn->batCacheid);
\
BBPunfix(b->batCacheid);
\
return MAL_SUCCEED;
\
@@ -163,8 +159,6 @@ str CMDscience_cst_bat_##FUNC##_##TYPE(b
bn->tnil = b->tnil;
\
bn->tnonil = b->tnonil;
\
BATkey(bn,0);
\
- if (!(bn->batDirty&2))
\
- BATsetaccess(bn, BAT_READ);
\
BBPkeepref(*ret = bn->batCacheid);
\
BBPunfix(b->batCacheid);
\
return MAL_SUCCEED;
\
diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c
--- a/monetdb5/modules/kernel/batstr.c
+++ b/monetdb5/modules/kernel/batstr.c
@@ -112,7 +112,6 @@ mal_export str STRbatsubstring(bat *ret,
X->tsorted=0;
\
X->trevsorted=0;
#define finalizeResult(X,Y,Z)
\
- if (!((Y)->batDirty&2)) BATsetaccess((Y), BAT_READ); \
*X = (Y)->batCacheid;
\
BBPkeepref(*(X));
\
BBPunfix(Z->batCacheid);
@@ -1192,7 +1191,6 @@ STRbatsubstringcst(bat *ret, const bat *
bn->tnonil = 0;
bunins_failed:
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*ret = bn->batCacheid;
BBPkeepref(bn->batCacheid);
BBPunfix(b->batCacheid);
diff --git a/monetdb5/modules/kernel/microbenchmark.c
b/monetdb5/modules/kernel/microbenchmark.c
--- a/monetdb5/modules/kernel/microbenchmark.c
+++ b/monetdb5/modules/kernel/microbenchmark.c
@@ -330,7 +330,6 @@ MBMrandom_seed(bat *ret, oid *base, lng
BATrandom(&bn, base, size, domain, *seed);
if( bn ){
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPkeepref(*ret= bn->batCacheid);
} else throw(MAL, "microbenchmark.random", OPERATION_FAILED);
return MAL_SUCCEED;
@@ -343,7 +342,6 @@ MBMuniform(bat *ret, oid *base, lng *siz
BATuniform(&bn, base, size, domain);
if( bn ){
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPkeepref(*ret= bn->batCacheid);
} else throw(MAL, "microbenchmark.uniform", OPERATION_FAILED);
return MAL_SUCCEED;
@@ -354,7 +352,6 @@ MBMnormal(bat *ret, oid *base, lng *size
BAT *bn = NULL;
BATnormal(&bn, base, size, domain, stddev, mean);
if( bn ){
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPkeepref(*ret= bn->batCacheid);
} else throw(MAL, "microbenchmark.uniform", OPERATION_FAILED);
return MAL_SUCCEED;
@@ -393,7 +390,6 @@ MBMskewed(bat *ret, oid *base, lng *size
BATskewed(&bn, base, size, domain, skew);
if( bn ){
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
BBPkeepref(*ret= bn->batCacheid);
} else throw(MAL, "microbenchmark,uniform", OPERATION_FAILED);
return MAL_SUCCEED;
diff --git a/monetdb5/modules/kernel/status.c b/monetdb5/modules/kernel/status.c
--- a/monetdb5/modules/kernel/status.c
+++ b/monetdb5/modules/kernel/status.c
@@ -186,8 +186,6 @@ SYScpuStatistics(bat *ret, bat *ret2)
BUNappend(bn, "elapsystem", FALSE);
BUNappend(b, &i, FALSE);
#endif
- if (!(b->batDirty&2)) BATsetaccess(b, BAT_READ);
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
pseudo(ret,ret2,bn,b);
return MAL_SUCCEED;
}
@@ -242,8 +240,6 @@ SYSmemStatistics(bat *ret, bat *ret2)
i = (lng) m.fordblks;
BUNappend(bn, "fordblks", FALSE);
BUNappend(b, &i, FALSE);
- if (!(b->batDirty&2)) BATsetaccess(b, BAT_READ);
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
pseudo(ret,ret2,bn,b);
return MAL_SUCCEED;
}
@@ -369,10 +365,8 @@ SYSmem_usage(bat *ret, bat *ret2, const
BUNappend(b, &tot, FALSE);
BBPunlock();
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*ret = bn->batCacheid;
BBPkeepref(bn->batCacheid);
- if (!(b->batDirty&2)) BATsetaccess(b, BAT_READ);
*ret2 = b->batCacheid;
BBPkeepref(b->batCacheid);
@@ -446,10 +440,8 @@ SYSvm_usage(bat *ret, bat *ret2, const l
BUNappend(b, &sz, FALSE);
BBPunlock();
- if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ);
*ret = bn->batCacheid;
BBPkeepref(bn->batCacheid);
- if (!(b->batDirty&2)) BATsetaccess(b, BAT_READ);
*ret2 = b->batCacheid;
BBPkeepref(b->batCacheid);
return MAL_SUCCEED;
@@ -554,8 +546,6 @@ SYSioStatistics(bat *ret, bat *ret2)
BUNappend(b, &i, FALSE);
#endif
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list