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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1446:    * It's a bit of a tricky race, but this check should be sufficient.    */    pgsqlsess->readyforquerycount++, retval = SYNCSEND;    pgsqlsess->pportalcount = 0;    }    }    return retval;    }       private void replenishrows() { -  if (_fetchlimit && datarows->size() <= _fetchlimit >> 1) { +  if (_fetchlimit && datarows->size() <= _fetchlimit >> 1 +  && _state >= COMMITTED) {    Thread.MutexKey lock = closemux->lock();    if (_fetchlimit) {    _fetchlimit = pgsqlsess._fetchlimit;    if (bytesreceived)    _fetchlimit =    min((portalbuffersize >> 1) * index / bytesreceived || 1, _fetchlimit);    if (_fetchlimit)    if (inflight <= (_fetchlimit - 1) >> 1) {    array reflock = ({ lock });    lock = 0;