Branch: Tag:

2018-05-07

2018-05-07 09:22:41 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Cater for empty start conditions.

1530:       private void replenishrows() {    if (_fetchlimit && sizeof(datarows) <= _fetchlimit >> 1) { +  _fetchlimit = pgsqlsess._fetchlimit; +  if (bytesreceived)    _fetchlimit = -  min((portalbuffersize >> 1) * index / bytesreceived || 1, -  pgsqlsess._fetchlimit); +  min((portalbuffersize >> 1) * index / bytesreceived || 1, _fetchlimit);    Thread.MutexKey lock = closemux->lock();    if (_fetchlimit && inflight <= (_fetchlimit - 1) >> 1)    _sendexecute(_fetchlimit);