pike.git / lib / modules / Sql.pmod / pgsql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:840:    lock=0;    }    PD("Bind portal %O statement %O\n",_portalname,_preparedname);    _fetchlimit=pgsqlsess->_fetchlimit;    _openportal();    conxion bindbuffer=c->start(1);    _unnamedstatementkey=0;    bindbuffer->add_int8('B')->add_hstring(plugbuffer,4,4);    if(!_tprepared && sizeof(_preparedname))    closestatement(bindbuffer,_preparedname); -  _sendexecute(pgsqlsess->_fetchlimit +  _sendexecute(_fetchlimit    && !(cachealways[_query]    || sizeof(_query)>=MINPREPARELENGTH &&    execfetchlimit->match(_query)) -  && FETCHLIMITLONGRUN,bindbuffer); +  && _fetchlimit,bindbuffer);    }    }       final void _openportal() {    pgsqlsess->_portalsinflight++;    Thread.MutexKey lock=closemux->lock();    _state=BOUND;    lock=0;    statuscmdcomplete=UNDEFINED;    }
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:928:    datarows->write(datarow);    if(++rowsreceived==1)    PD("<%O _fetchlimit %d=min(%d||1,%d), inflight %d\n",_portalname,    _fetchlimit,(portalbuffersize>>1)*rowsreceived/bytesreceived,    pgsqlsess._fetchlimit,inflight);    if(_fetchlimit) {    _fetchlimit=    min((portalbuffersize>>1)*rowsreceived/bytesreceived||1,    pgsqlsess._fetchlimit);    Thread.MutexKey lock=closemux->lock(); -  if(_fetchlimit && inflight<=_fetchlimit-1) +  if(_fetchlimit && inflight<=(_fetchlimit>>1)-1)    _sendexecute(_fetchlimit);    else if(!_fetchlimit)    PD("<%O _fetchlimit %d, inflight %d, skip execute\n",    _portalname,_fetchlimit,inflight);    lock=0;    }    }       private void releaseconditions() {    pgsqlsess=0;