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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:790:    waitfordescribe();    }    if(_state>=CLOSING)    lock=_unnamedstatementkey=0;    else {    plugbuffer->add_int16(sizeof(datarowtypes));    if(sizeof(datarowtypes))    foreach(datarowtypes;;int typ)    plugbuffer->add_int16(oidformat(typ));    else if(commitprefix->match(_query)) { -  +     lock=pgsqlsess->_shortmux->lock();    if(pgsqlsess->_portalsinflight) {    pgsqlsess->_waittocommit++;    PD("Commit waiting for portals to finish\n");    pgsqlsess->_readyforcommit->wait(lock);    pgsqlsess->_waittocommit--;    }    }    lock=0;    PD("Bind portal %O statement %O\n",_portalname,_preparedname);
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:904:    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)-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;