Changeset: 3c299e36526a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c299e36526a Modified Files: sql/backends/monet5/UDF/pyapi/connection.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/UDF/pyapi/pyapi.h Branch: default Log Message:
Allow Loopback queries in parallel when forking is disabled diffs (34 lines): diff --git a/sql/backends/monet5/UDF/pyapi/connection.c b/sql/backends/monet5/UDF/pyapi/connection.c --- a/sql/backends/monet5/UDF/pyapi/connection.c +++ b/sql/backends/monet5/UDF/pyapi/connection.c @@ -48,7 +48,7 @@ static PyObject *_connection_execute(Py_ PyErr_Format(PyExc_Exception, "%s", SQLSTATE(HY001) MAL_MALLOC_FAIL); return NULL; } - if (!self->mapped) { + if (!self->mapped || option_disable_fork) { // This is not a mapped process, so we can just directly execute the // query here PyObject *result; diff --git a/sql/backends/monet5/UDF/pyapi/pyapi.c b/sql/backends/monet5/UDF/pyapi/pyapi.c --- a/sql/backends/monet5/UDF/pyapi/pyapi.c +++ b/sql/backends/monet5/UDF/pyapi/pyapi.c @@ -25,7 +25,7 @@ #endif const char *fork_disableflag = "disable_fork"; -static bool option_disable_fork = false; +bool option_disable_fork = false; static PyObject *marshal_module = NULL; PyObject *marshal_loads = NULL; diff --git a/sql/backends/monet5/UDF/pyapi/pyapi.h b/sql/backends/monet5/UDF/pyapi/pyapi.h --- a/sql/backends/monet5/UDF/pyapi/pyapi.h +++ b/sql/backends/monet5/UDF/pyapi/pyapi.h @@ -42,4 +42,6 @@ str _loader_init(void); pyapi_export char *PyError_CreateException(char *error_text, char *pycall); +pyapi_export bool option_disable_fork; + #endif /* _PYPI_LIB_ */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list