Changeset: d5b7e849f696 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d5b7e849f696
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_batop.c
gdk/gdk_tm.c
Branch: default
Log Message:
Cleanup: remove unused (never called) functions TMsubcommit and BATreplacepos.
diffs (103 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -181,7 +181,6 @@ BAT *BATproject2(BAT *restrict l, BAT *r
BAT *BATprojectchain(BAT **bats);
gdk_return BATrangejoin(BAT **r1p, BAT **r2p, BAT *l, BAT *rl, BAT *rh, BAT
*sl, BAT *sr, bool li, bool hi, bool anti, bool symmetric, BUN estimate)
__attribute__((__warn_unused_result__));
gdk_return BATreplace(BAT *b, BAT *p, BAT *n, bool force)
__attribute__((__warn_unused_result__));
-gdk_return BATreplacepos(BAT *b, const oid *positions, BAT *n, bool autoincr,
bool force) __attribute__((__warn_unused_result__));
void BATrmprop(BAT *b, enum prop_t idx);
void BATrmprop_nolock(BAT *b, enum prop_t idx);
gdk_return BATrtree(BAT *wkb, BAT *mbr);
@@ -415,7 +414,6 @@ gdk_return STRMPcreate(BAT *b, BAT *s);
void STRMPdestroy(BAT *b);
BAT *STRMPfilter(BAT *b, BAT *s, const char *q, const bool keep_nils);
bool THRhighwater(void);
-gdk_return TMsubcommit(BAT *bl) __attribute__((__warn_unused_result__));
gdk_return TMsubcommit_list(bat *restrict subcommit, BUN *restrict sizes, int
cnt, lng logno) __attribute__((__warn_unused_result__));
void VALclear(ValPtr v);
int VALcmp(const ValRecord *p, const ValRecord *q);
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1314,8 +1314,6 @@ gdk_export gdk_return BATreplace(BAT *b,
__attribute__((__warn_unused_result__));
gdk_export gdk_return BATupdate(BAT *b, BAT *p, BAT *n, bool force)
__attribute__((__warn_unused_result__));
-gdk_export gdk_return BATreplacepos(BAT *b, const oid *positions, BAT *n, bool
autoincr, bool force)
- __attribute__((__warn_unused_result__));
gdk_export gdk_return BATupdatepos(BAT *b, const oid *positions, BAT *n, bool
autoincr, bool force)
__attribute__((__warn_unused_result__));
@@ -2100,8 +2098,6 @@ BUNtoid(BAT *b, BUN p)
/*
* @+ Transaction Management
*/
-gdk_export gdk_return TMsubcommit(BAT *bl)
- __attribute__((__warn_unused_result__));
gdk_export gdk_return TMsubcommit_list(bat *restrict subcommit, BUN *restrict
sizes, int cnt, lng logno)
__attribute__((__warn_unused_result__));
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1790,12 +1790,14 @@ BATupdate(BAT *b, BAT *p, BAT *n, bool f
return BATappend_or_update(b, p, NULL, n, true, false, force);
}
+#if 0 /* not used */
/* like BATreplace, but the positions are given by an array of oid values */
gdk_return
BATreplacepos(BAT *b, const oid *positions, BAT *n, bool autoincr, bool force)
{
return BATappend_or_update(b, NULL, positions, n, false, autoincr,
force);
}
+#endif
/* like BATreplace, but the positions are given by an array of oid
* values, and they may specify locations beyond the end of b */
diff --git a/gdk/gdk_tm.c b/gdk/gdk_tm.c
--- a/gdk/gdk_tm.c
+++ b/gdk/gdk_tm.c
@@ -156,7 +156,7 @@ TMcommit(void)
* @- TMsubcommit
*
* Create a new checkpoint that is equal to the previous, with the
- * exception that for the passed list of batnames, the current state
+ * exception that for the passed list of bats, the current state
* will be reflected in the new checkpoint.
*
* On the bats in this list we assume exclusive access during the
@@ -220,32 +220,3 @@ TMsubcommit_list(bat *restrict subcommit
BBPtmunlock();
return ret;
}
-
-gdk_return
-TMsubcommit(BAT *b)
-{
- int cnt = 1;
- gdk_return ret = GDK_FAIL;
- bat *subcommit;
- BUN p, q;
-
- subcommit = GDKmalloc((BATcount(b) + 1) * sizeof(bat));
- if (subcommit == NULL)
- return GDK_FAIL;
-
- BATiter bi = bat_iterator(b);
- subcommit[0] = 0; /* BBP artifact: slot 0 in the array will be
ignored */
- /* collect the list and save the new bats outside any
- * locking */
- BATloop(b, p, q) {
- bat bid = BBPindex((str) BUNtvar(bi, p));
-
- if (bid)
- subcommit[cnt++] = bid;
- }
- bat_iterator_end(&bi);
-
- ret = TMsubcommit_list(subcommit, NULL, cnt, -1);
- GDKfree(subcommit);
- return ret;
-}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]