Changeset: 105abb7aecda for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/105abb7aecda Branch: dict Log Message:
merged with d diffs (129 lines): diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c --- a/gdk/gdk_project.c +++ b/gdk/gdk_project.c @@ -776,7 +776,7 @@ BATproject2(BAT *restrict l, BAT *restri /* handle string trick */ if (stringtrick) { assert(r1i.vh); - if (r1->batRestricted == BAT_READ) { + if (r1->batRestricted == BAT_READ || VIEWvtparent(r1)) { /* really share string heap */ assert(r1i.vh->parentid > 0); BBPshare(r1i.vh->parentid); diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c --- a/monetdb5/mal/mal_profiler.c +++ b/monetdb5/mal/mal_profiler.c @@ -60,7 +60,7 @@ static struct rusage prevUsage; #define LOGLEN 8192 // The heart beat events should be sent to all outstanding channels. -static void logjsonInternal(char *logbuffer) +static void logjsonInternal(char *logbuffer, bool flush) { size_t len; len = strlen(logbuffer); @@ -68,8 +68,8 @@ static void logjsonInternal(char *logbuf MT_lock_set(&mal_profileLock); if (maleventstream) { // upon request the log record is sent over the profile stream - if (mnstr_write(maleventstream, logbuffer, 1, len) != BLOCK) /* if we wrote exactly the BLOCK size, it was - flushed allready */ + (void) mnstr_write(maleventstream, logbuffer, 1, len); + if (flush) (void) mnstr_flush(maleventstream, MNSTR_FLUSH_DATA); } MT_lock_unset(&mal_profileLock); @@ -142,7 +142,7 @@ logadd(struct logbuf *logbuf, const char /* includes first time when logbuffer == NULL and logcap = 0 */ char *alloc_buff; if (logbuf->loglen > 0) - logjsonInternal(logbuf->logbuffer); + logjsonInternal(logbuf->logbuffer, false); logbuf->logcap = (size_t) tmp_len + (size_t) tmp_len/2; if (logbuf->logcap < LOGLEN) logbuf->logcap = LOGLEN; @@ -157,7 +157,7 @@ logadd(struct logbuf *logbuf, const char logbuf->logbuffer = alloc_buff; lognew(logbuf); } else { - logjsonInternal(logbuf->logbuffer); + logjsonInternal(logbuf->logbuffer, false); lognew(logbuf); } } @@ -477,7 +477,7 @@ renderProfilerEvent(Client cntxt, MalBlk str ev; ev = prepareProfilerEvent(cntxt, mb, stk, pci, start); if( ev ){ - logjsonInternal(ev); + logjsonInternal(ev, true); free(ev); } } @@ -615,7 +615,7 @@ profilerHeartbeatEvent(char *alter) "}\n", // end marker alter, cpuload)) return; - logjsonInternal(logbuf.logbuffer); + logjsonInternal(logbuf.logbuffer, true); logdel(&logbuf); } @@ -650,7 +650,7 @@ openProfilerStream(Client cntxt) #endif if (myname == 0){ myname = putName("profiler"); - logjsonInternal(monet_characteristics); + logjsonInternal(monet_characteristics, true); } if(maleventstream){ /* The DBA can always grab the stream, others have to wait */ @@ -720,7 +720,7 @@ startProfiler(Client cntxt) } malProfileMode = 1; MT_lock_unset(&mal_profileLock); - logjsonInternal(monet_characteristics); + logjsonInternal(monet_characteristics, true); // reset the trace table clearTrace(cntxt); diff --git a/sql/backends/monet5/UDF/pyapi3/undef.h b/sql/backends/monet5/UDF/pyapi3/undef.h --- a/sql/backends/monet5/UDF/pyapi3/undef.h +++ b/sql/backends/monet5/UDF/pyapi3/undef.h @@ -26,7 +26,9 @@ #undef snprintf #undef vsnprintf +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 10 #undef ssize_t +#endif #ifndef bool #define bool unsigned char diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -5728,8 +5728,10 @@ sql_trans_create_column(sql_column **rco } if (tpe->type->s) {/* column depends on type */ - if ((res = sql_trans_create_dependency(tr, tpe->type->base.id, col->base.id, TYPE_DEPENDENCY))) + if ((res = sql_trans_create_dependency(tr, tpe->type->base.id, col->base.id, TYPE_DEPENDENCY))) { + ATOMIC_PTR_DESTROY(&col->data); return res; + } if (!isNew(tpe->type) && (res = sql_trans_add_dependency(tr, tpe->type->base.id, ddl))) { ATOMIC_PTR_DESTROY(&col->data); return res; diff --git a/sql/test/BugTracker-2021/Tests/All b/sql/test/BugTracker-2021/Tests/All --- a/sql/test/BugTracker-2021/Tests/All +++ b/sql/test/BugTracker-2021/Tests/All @@ -24,7 +24,7 @@ rollup-distinct-count.Bug-7146 sum-union.Bug-7147 distinct-union.Bug-7148 HAVE_LIBPY3?python-aggregates-empty.Bug-7158 -remote-join-idxs.Bug-7165 +HAVE_PYMONETDB?remote-join-idxs.Bug-7165 shutdown-force.Bug-7167 replace-transaction-conflict.Bug-7168 merge-table-join.Bug-7172 _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list