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:510:
final bufcon|conxsess start(void|int waitforreal) { Thread.MutexKey lock; #ifdef PG_DEBUGRACE if (nostash->current_locking_thread()) PD("Nostash locked by %s\n", describe_backtrace(nostash->current_locking_thread()->backtrace())); #endif while (lock = (waitforreal ? nostash->lock : nostash->trylock)(1)) { int mode;
-
if (!stashcount->drained()) {
-
lock = 0; // Force release before acquiring next
+
stashcount->wait_till_drained();
-
continue;
-
}
+
#ifdef PG_DEBUGRACE conxsess sess = conxsess(this); #endif started = lock; lock = 0; // Force release before acquiring next lock = shortmux->lock(); mode = getstash(KEEP); lock = 0; if (mode > KEEP) sendcmd(mode); // Force out stash to the server
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:841:
string res; switch (type) { case 'O': int fd = -1; if (c && c->socket) catch(fd = c->socket->query_fd()); res = sprintf("Result state: %d numrows: %d eof: %d inflight: %d\n" "query: %O\n" #if PG_DEBUGHISTORY > 0 "history: %O\n"
+
"stash: %O\n"
#endif "fd: %O portalname: %O datarows: %d" " synctransact: %d laststatus: %s\n", _state, index, eoffound, inflight, qalreadyprinted == this ? "..." : _query, #if PG_DEBUGHISTORY > 0 qalreadyprinted == this ? 0 : c && c->i->history,
-
+
qalreadyprinted == this ? 0
+
: c && (string)c->stash,
#endif fd, _portalname, datarowtypes && sizeof(datarowtypes), _synctransact, statuscmdcomplete || (_unnamedstatementkey ? "*parsing*" : "")); qalreadyprinted = this; break; } return res; }
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1674:
Thread.MutexKey lock = _ddescribemux->lock(); statuscmdcomplete = statusccomplete; _ddescribe->broadcast(); } inflight = 0; conxsess plugbuffer; array(Thread.MutexKey) reflock = ({closemux->lock()}); if (!catch(plugbuffer = c->start())) plugbuffer->sendcmd(_closeportal(plugbuffer, reflock)); reflock = 0;
-
if (_state < CLOSED)
+
if (_state < CLOSED)
{
_state = CLOSED;
-
+
stmtifkey = 0;
+
}
datarows->write(1); // Signal EOF releaseconditions(); } protected void _destruct() { catch { // inside destructors, exceptions don't work _releasesession(); }; }