pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql_util.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1317:
PD("Commit waiting for statements to finish\n"); catch(PT(pgsqlsess->statementsinflight->wait_till_drained())); } stmtifkey = pgsqlsess->statementsinflight->acquire(); } statuscmdcomplete = 0; pgsqlsess->wasparallelisable = paralleliseprefix->match(_query); } final void _releasestatement() {
-
Thread.MutexKey lock = closemux->lock(
2
);
+
Thread.MutexKey lock = closemux->lock();
if (_state <= BOUND) { _state = COMMITTED; stmtifkey = 0; } } final void _bindportal() { Thread.MutexKey lock = closemux->lock(); _state = BOUND; portalsifkey = pgsqlsess->portalsinflight->acquire();
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1360:
} final int _closeportal(conxsess cs, array(Thread.MutexKey) reflock) { void|bufcon|conxsess plugbuffer = CHAIN(cs); int retval = KEEP; PD("%O Try Closeportal %d\n", _portalname, _state); _fetchlimit = 0; // disables further Executes switch (_state) { case PARSING: case BOUND:
-
_releasestatement();
+
_
state = COMMITTED; // Avoid _
releasestatement()
to prevent
+
stmtifkey = 0
;
// lock recursion and lock inversion deadlock
} switch (_state) { case PORTALINIT: case PARSING: _unnamedstatementkey = 0; _state = CLOSING; break; case COPYINPROGRESS: PD("CopyDone\n"); plugbuffer->add("c\0\0\0\4");