Changeset: 12097777d16b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12097777d16b
Modified Files:
gdk/gdk_system.c
sql/backends/monet5/sql_upgrades.c
Branch: cmake-monetdblite
Log Message:
More defensive lines in gdk_system. Wlr module is not available on MonetDBLite
for now, so change sql_update_mar2018 premise.
diffs (85 lines):
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -324,9 +324,11 @@ join_threads(void)
w->waiting = true;
LeaveCriticalSection(&winthread_cs);
THRDDEBUG MT_fprintf(stderr, "#join \"%s\"
\"%s\"\n", MT_thread_getname(), w->threadname);
- self->joinwait = w;
+ if (self)
+ self->joinwait = w;
WaitForSingleObject(w->hdl, INFINITE);
- self->joinwait = NULL;
+ if (self)
+ self->joinwait = NULL;
CloseHandle(w->hdl);
rm_winthread(w);
waited = true;
@@ -352,9 +354,11 @@ join_detached_threads(void)
w->waiting = true;
LeaveCriticalSection(&winthread_cs);
THRDDEBUG MT_fprintf(stderr, "#join \"%s\"
\"%s\"\n", MT_thread_getname(), w->threadname);
- self->joinwait = w;
+ if (self)
+ self->joinwait = w;
WaitForSingleObject(w->hdl, INFINITE);
- self->joinwait = NULL;
+ if (self)
+ self->joinwait = NULL;
CloseHandle(w->hdl);
rm_winthread(w);
waited = true;
@@ -429,9 +433,11 @@ MT_join_thread(MT_Id t)
return -1;
THRDDEBUG MT_fprintf(stderr, "#join \"%s\" \"%s\"\n",
MT_thread_getname(), w->threadname);
struct winthread *self = TlsGetValue(threadslot);
- self->joinwait = w;
+ if (self)
+ self->joinwait = w;
DWORD ret = WaitForSingleObject(w->hdl, INFINITE);
- self->joinwait = NULL;
+ if (self)
+ self->joinwait = NULL;
if (ret == WAIT_OBJECT_0 && CloseHandle(w->hdl)) {
rm_winthread(w);
return 0;
@@ -652,9 +658,11 @@ join_threads(void)
p->waiting = true;
pthread_mutex_unlock(&posthread_lock);
THRDDEBUG MT_fprintf(stderr, "#join \"%s\"
\"%s\"\n", MT_thread_getname(), p->threadname);
- self->joinwait = p;
+ if (self)
+ self->joinwait = p;
pthread_join(p->tid, NULL);
- self->joinwait = NULL;
+ if (self)
+ self->joinwait = NULL;
rm_posthread(p);
waited = true;
pthread_mutex_lock(&posthread_lock);
@@ -679,9 +687,11 @@ join_detached_threads(void)
p->waiting = true;
pthread_mutex_unlock(&posthread_lock);
THRDDEBUG MT_fprintf(stderr, "#join \"%s\"
\"%s\"\n", MT_thread_getname(), p->threadname);
- self->joinwait = p;
+ if (self)
+ self->joinwait = p;
pthread_join(p->tid, NULL);
- self->joinwait = NULL;
+ if (self)
+ self->joinwait = NULL;
rm_posthread(p);
waited = true;
pthread_mutex_lock(&posthread_lock);
diff --git a/sql/backends/monet5/sql_upgrades.c
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -2054,7 +2054,7 @@ SQLupgrades(Client c, mvc *m)
}
#endif
- if (!sql_bind_func(m->sa, s, "master", NULL, NULL, F_PROC)) {
+ if (mvc_bind_table(m, s, "comments") == NULL) {
if ((err = sql_update_mar2018(c, m)) != NULL) {
MT_fprintf(stderr, "!%s\n", err);
freeException(err);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list