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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:530:    break;    case FLUSHLOGSEND:    PD("%d>%O %d Queue simplequery %d bytes\n", socket->query_fd(),    portal._portalname, ++queueoutidx, sizeof(this));    mode = FLUSHSEND;    }    qportals->write(synctransact++);    } while (0);    if (sizeof(stash))    mode = getstash(mode); + #ifdef PG_DEBUG +  mixed err; + #endif    for(;;) {   #ifdef PG_DEBUG -  mixed err = +  err =   #endif    catch {   outer:    do {    switch (mode) {    default:    PD("%d>Skip flush %d Queue %O\n",    socket->query_fd(), mode, (string)this);    break outer;    case FLUSHSEND:
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1465:    } else    PD("<%O _fetchlimit %d, inflight %d, skip execute\n",    _portalname, _fetchlimit, inflight);    }    }    }       final void _processdataready(array datarow, void|int msglen) {    bytesreceived += msglen;    inflight--; -  if (_state<CLOSED) +  if (_state < CLOSED)    datarows->write(datarow);    if (++index == 1)    PD("<%O _fetchlimit %d=min(%d||1,%d), inflight %d\n", _portalname,    _fetchlimit, (portalbuffersize >> 1) * index / bytesreceived,    pgsqlsess._fetchlimit, inflight);    replenishrows();    }       private void releaseconditions() {    _unnamedportalkey = _unnamedstatementkey = 0;
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1922: Inside #if defined(PG_DEBUG) and #if defined(PG_DEBUGMORE)
   PD(sprintf(">>>>>>>>>>> Portalstack %s: %O\n", label, portal));    foreach (qportals->peek_array(); ; int|sql_result qp)    PD(" =========== Portal: %O\n", qp);    PD("<<<<<<<<<<<<<< Portalstack end\n");    };   #endif    void showportal(int msgtype) {    if (objectp(portal))    PD("%d<%O %d %c switch portal\n",    ci->socket->query_fd(), portal._portalname, ++ci->queueinidx, msgtype); -  else if (portal>0) +  else if (portal > 0)    PD("%d<Sync %d %d %c portal\n",    ci->socket->query_fd(), ++ci->queueinidx, portal, msgtype);    };   #endif    int msgisfatal(mapping(string:string) msgresponse) {    int isfatal = (has_prefix(msgresponse.C, "53")    || has_prefix(msgresponse.C, "3D")    || has_prefix(msgresponse.C, "57P")) && MAGICTERMINATE;    if (isfatal && !terminating) // Run the callback once per lost connection    runcallback(backendpid, "_lost", "");