Changeset: 8dade5c9f019 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8dade5c9f019
Modified Files:
monetdb5/mal/mal_interpreter.c
Branch: Dec2025
Log Message:
Fix (potential) race condition.
diffs (22 lines):
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -588,8 +588,6 @@ runMALsequence(Client cntxt, MalBlkPtr m
runtimeProfileBegin(cntxt, mb, stk, pci, &runtimeProfile);
if (runtimeProfile.ticks > lastcheck + CHECKINTERVAL) {
if (cntxt->fdin && TIMEOUT_TEST(&cntxt->qryctx)) {
- if (cntxt->qryctx.endtime != QRY_INTERRUPT &&
cntxt->qryctx.endtime != QRY_TIMEOUT)
- cntxt->mode = FINISHCLIENT;
switch (cntxt->qryctx.endtime) {
case QRY_TIMEOUT:
ret = createException(MAL,
"mal.interpreter", SQLSTATE(HYT00) RUNTIME_QRY_TIMEOUT);
@@ -599,7 +597,9 @@ runMALsequence(Client cntxt, MalBlkPtr m
break;
default:
ret = createException(MAL,
"mal.interpreter", SQLSTATE(HYT00) "Client disconnected");
+ MT_lock_set(&mal_contextLock);
cntxt->mode = FINISHCLIENT;
+ MT_lock_unset(&mal_contextLock);
break;
}
break;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]