Changeset: 787c112489f6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/787c112489f6
Modified Files:
gdk/gdk_heap.c
sql/backends/monet5/UDF/pyapi3/convert_loops.h
Branch: default
Log Message:
Heap filename for STORE_MMAPABS is name of file inside BATDIR of farm 0 always.
This is what was used in some cases, and in other cases it was supposed
to contain the absolute path name (which is usually far too long).
diffs (32 lines):
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -602,9 +602,10 @@ HEAPfree(Heap *h, bool rmheap)
if (h->storage == STORE_MMAPABS) {
/* heap is stored in a mmap() file, but h->filename
* is the absolute path */
- if (MT_remove(h->filename) != 0 && errno != ENOENT) {
- perror(h->filename);
- }
+ char *path = GDKfilepath(0, BATDIR, h->filename, NULL);
+ if (path && MT_remove(path) != 0 && errno != ENOENT)
+ perror(path);
+ GDKfree(path);
} else
#endif
if (rmheap && !GDKinmemory(h->farmid)) {
diff --git a/sql/backends/monet5/UDF/pyapi3/convert_loops.h
b/sql/backends/monet5/UDF/pyapi3/convert_loops.h
--- a/sql/backends/monet5/UDF/pyapi3/convert_loops.h
+++ b/sql/backends/monet5/UDF/pyapi3/convert_loops.h
@@ -119,8 +119,9 @@
* the absolute path */
\
char address[100];
\
GDKmmapfile(address, sizeof(address),
ret->mmap_id); \
- snprintf(bat->theap->filename,
sizeof(bat->theap->filename), \
- "%s%c%s.tmp", BATDIR, DIR_SEP,
address); \
+ strconcat_len(bat->theap->filename,
\
+
sizeof(bat->theap->filename), \
+ address, ".tmp",
NULL); \
ret->mmap_id = -1;
\
}
\
}
\
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]