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:149:
class bufcon { inherit Stdio.Buffer; private conxion realbuffer; protected void create(conxion _realbuffer) { realbuffer=_realbuffer; }
+
final int `stashcount() {
+
return realbuffer->stashcount;
+
}
+
final bufcon start(void|int waitforreal) { realbuffer->stashcount++; #ifdef PG_DEBUG if(waitforreal) error("pgsql.bufcon not allowed here\n"); #endif return this; } final void sendcmd(int mode,void|sql_result portal) {
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:923:
_state=CLOSED; lock=0; releaseconditions(); } final int _closeportal(bufcon plugbuffer) { int retval=KEEP; PD("%O Try Closeportal %d\n",_portalname,_state); Thread.MutexKey lock=closemux->lock(); _fetchlimit=0; // disables further Executes
-
int alreadyfilled=sizeof(plugbuffer);
-
/* alreadyfilled will be non-zero if a parse request has been queued
-
* before the close was initiated.
-
* It's a bit of a tricky race, but this check should be sufficient.
-
*/
+
switch(_state) { case PORTALINIT: _unnamedstatementkey=0; _state=CLOSING; break; case COPYINPROGRESS: PD("CopyDone\n"); plugbuffer->add("c\0\0\0\4"); case BOUND: _state=CLOSING;
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:951:
plugbuffer->add_int8('C')->add_hstring(({'P',_portalname,0}),4,4); retval=FLUSHSEND; } else _unnamedportalkey=0; Thread.MutexKey lockc=pgsqlsess->_shortmux->lock(); if(!--pgsqlsess->_portalsinflight) { if(pgsqlsess->_waittocommit) { PD("Signal no portals in flight\n"); catch(pgsqlsess->_readyforcommit->signal()); lockc=0;
-
} else if(!
alreadyfilled
)
+
/*
+
* stashcount will be non-zero if a parse request has been queued
+
* before the close was initiated.
+
* It's a bit of a tricky race, but this check should be sufficient.
+
*/
+
} else if
(!
plugbuffer->stashcount
)
pgsqlsess->_readyforquerycount++, retval=SYNCSEND; pgsqlsess->_pportalcount=0; } lockc=0; } lock=0; return retval; } final void _processdataready(array datarow,void|int msglen) {