Changeset: 61e2c31180ed for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/61e2c31180ed
Modified Files:
gdk/gdk_batop.c
Branch: default
Log Message:
Merge with Jul2021 branch.
diffs (110 lines):
diff --git a/common/stream/bs2.c b/common/stream/bs2.c
--- a/common/stream/bs2.c
+++ b/common/stream/bs2.c
@@ -351,7 +351,7 @@ bs2_read(stream *restrict ss, void *rest
return -1;
}
#ifdef BSTREAM_DEBUG
- fprintf(stderr, "R1 '%s' length: %lld, final: %s\n", ss->name,
blksize >> 1, blksize & 1 ? "true" : "false");
+ fprintf(stderr, "R1 '%s' length: %" PRId64 ", final: %s\n",
ss->name, blksize >> 1, blksize & 1 ? "true" : "false");
#endif
s->itotal = (size_t) (blksize >> 1); /* amount readable */
/* store whether this was the last block or not */
@@ -431,7 +431,7 @@ bs2_read(stream *restrict ss, void *rest
return -1;
}
#ifdef BSTREAM_DEBUG
- fprintf(stderr, "R3 '%s' length: %lld, final: %s\n",
ss->name, blksize >> 1, blksize & 1 ? "true" : "false");
+ fprintf(stderr, "R3 '%s' length: %" PRId64 ", final:
%s\n", ss->name, blksize >> 1, blksize & 1 ? "true" : "false");
#endif
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -39,12 +39,12 @@ unshare_varsized_heap(BAT *b)
}
ATOMIC_INIT(&h->refs, 1);
MT_lock_set(&b->theaplock);
- Heap *oldheap = b->tvheap;
+ int parent = b->tvheap->parentid;
HEAPdecref(b->tvheap, false);
b->tvheap = h;
MT_lock_unset(&b->theaplock);
- BBPunshare(oldheap->parentid);
- BBPunfix(oldheap->parentid);
+ BBPunshare(parent);
+ BBPunfix(parent);
}
return GDK_SUCCEED;
}
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1404,28 +1404,28 @@ def PerformDir(env, testdir, testlist, a
if pSrvr is not None:
pSrvr.terminate()
pSrvr = None
- o = openutf8(os.path.join(TSTTRGDIR, 'SingleServer.out.html'),
'w')
- o.write('<html><head><title>{} standard output</title></head>'
- '<body><pre>\n'.format(TSTDIR))
- e = F_OK
- for line in openutf8(os.path.join(TSTTRGDIR,
'SingleServer.out')):
- if line != '\n' and not line.startswith('#'):
- e = F_ERROR
- ssout = F_ERROR
- o.write(line.replace('&', '&').replace('<',
'<').replace('>', '>'))
- o.write('</pre></body></html>\n')
- o.close()
- o = openutf8(os.path.join(TSTTRGDIR, 'SingleServer.err.html'),
'w')
- o.write('<html><head><title>{} standard error</title></head>'
- '<body><pre>\n'.format(TSTDIR))
- e = F_OK
- for line in openutf8(os.path.join(TSTTRGDIR,
'SingleServer.err')):
- if line != '\n' and not line.startswith('#'):
- e = F_ERROR
- sserr = F_ERROR
- o.write(line.replace('&', '&').replace('<',
'<').replace('>', '>'))
- o.write('</pre></body></html>\n')
- o.close()
+ for ext in ['out', 'err']:
+ o = openutf8(os.path.join(TSTTRGDIR,
f'SingleServer.{ext}.html'), 'w')
+ o.write('<html>\n')
+ o.write('<head><title>{} standard
{}</title></head>\n'.format(TSTDIR, 'output' if ext == 'out' else 'error'))
+ o.write('<body>\n')
+ empty = True
+ for line in openutf8(os.path.join(TSTTRGDIR,
f'SingleServer.{ext}')):
+ if empty:
+ o.write('<pre>\n')
+ empty = False
+ span1 = span2 = ''
+ if line != '\n' and not line.startswith('#'):
+ if ext == 'out':
+ ssout = F_ERROR
+ else:
+ sserr = F_ERROR
+ span1 = '<span style="background-color:
rgb(100%,0%,0%);">'
+ span2 = '</span>\n'
+ line = line.rstrip('\n')
+ o.write(span1 + line.replace('&',
'&').replace('<', '<').replace('>', '>') + span2)
+ o.write('{}\n</body>\n</html>\n'.format('<p>(nothing to
see here)</p>' if empty else '</pre>'))
+ o.close()
TIMES.append((TSTDIR, '', "%7.3f" % td, td, FdOut, FdErr, None))
if testweb:
os.chdir(TSTTRGDIR)
@@ -2541,6 +2541,7 @@ class ServerClass:
self.timer = t
port = None
+ self.port = None
if self.pollfile:
while True:
proc.poll()
@@ -2573,7 +2574,6 @@ class ServerClass:
proc.terminate()
proc.wait()
t.cancel()
- self.port = None
return
self.started = True
self.port = port
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list