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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:471: Inside #if constant(SSL.File)
   final sfile   #if constant(SSL.File)    |SSL.File   #endif    socket;    final multiset(Result) runningportals = (<>);       final MUTEX nostash;    final Thread.MutexKey started;    final Thread.Queue stashqueue; -  final Thread.Condition stashavail; +     final Stdio.Buffer stash;    //! @ignore    final int(KEEP..SYNCSEND) stashflushmode;    //! @endignore    final Thread.ResourceCount stashcount;    final int synctransact;   #ifdef PG_DEBUGRACE    final mixed nostrack;   #endif   #ifdef PG_DEBUG
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:765:       protected void create(proxy pgsqlsess, Thread.Queue _qportals, int nossl) {    o::create();    qportals = _qportals;    synctransact = 1;    socket = sfile();    i = conxiin();    shortmux = MUTEX();    nostash = MUTEX();    closenext = 0; -  stashavail = Thread.Condition(); +     stashqueue = Thread.Queue();    stash = Stdio.Buffer();    stashcount = Thread.ResourceCount();    Thread.Thread(connectloop, pgsqlsess, nossl);    }   };      #ifdef PG_DEBUGRACE   class conxsess {    final conxion chain;
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:2407:    PD("Checking portal %O %d<=%d\n",    qp._portalname, qp._synctransact, portal);    qp->_purgeportal();    }    }    portal = 0;   #ifdef PG_DEBUGMORE    showportalstack("AFTER READYFORQUERY");   #endif    readyforquerycount--; -  if (readyforquery_cb) -  readyforquery_cb(), readyforquery_cb = 0; +  function (:void) cb; +  if (cb = readyforquery_cb) +  readyforquery_cb = 0, cb();    destruct(waitforauthready);    break;    }    case '1':   #ifdef PG_DEBUG    PD("ParseComplete portal %O\n", portal);    msglen -= 4;   #endif    break;    case 't': {
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:2488:    portal->_processrowdesc(a, at);    portal = 0;    }    break;    }    case 'n': {   #ifdef PG_DEBUG    msglen -= 4;    PD("NoData %O\n", portal._query);   #endif +  if (!portal._forcetext) {    portal._fetchlimit = 0; // disables subsequent Executes    portal->_processrowdesc(({}), ({}));    portal = 0; -  +  }    break;    }    case 'H':    portal->_processrowdesc(@getcols());    PD("CopyOutResponse %O\n", portal. _query);    break;    case '2': {    mapping tp;   #ifdef PG_DEBUG    msglen -= 4;
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:2556:   #endif    portal = 0;    break;    case 'C': {    msglen -= 4;   #ifdef PG_DEBUG    if (msglen < 1)    errtype = PROTOCOLERROR;   #endif    string s = cr->read(msglen - 1); -  portal->_storetiming(); -  PD("%O CommandComplete %O\n", portal._portalname, s); +  PD("%O CommandComplete %O\n", +  objectp(portal) && portal._portalname, s);   #ifdef PG_DEBUG    if (cr->read_int8())    errtype = PROTOCOLERROR;    msglen = 0;   #else    cr->consume(1);   #endif   #ifdef PG_DEBUGMORE    showportalstack("COMMANDCOMPLETE");   #endif -  +  if (!portal._forcetext) { +  portal->_storetiming();    portal->_releasesession(s);    portal = 0; -  +  }    break;    }    case 'I':   #ifdef PG_DEBUG    PD("EmptyQueryResponse %O\n", portal._portalname);    msglen -= 4;   #endif   #ifdef PG_DEBUGMORE    showportalstack("EMPTYQUERYRESPONSE");   #endif -  +  if (!portal._forcetext) {    portal->_releasesession();    portal = 0; -  +  }    break;    case 'd':    PD("%O CopyData\n", portal._portalname);    portal->_storetiming();    msglen -= 4;   #ifdef PG_DEBUG    if (msglen < 0)    errtype = PROTOCOLERROR;   #endif    portal->_processdataready(({cr->read(msglen)}), msglen);
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:2607:    portal->_releasestatement();    portal->_setrowdesc(@getcols());    PD("%O CopyInResponse\n", portal._portalname);    portal._state = COPYINPROGRESS;    break;    case 'c':   #ifdef PG_DEBUG    PD("%O CopyDone\n", portal._portalname);    msglen -= 4;   #endif +  if (!portal._forcetext)    portal = 0;    break;    case 'E': {   #ifdef PG_DEBUGMORE    showportalstack("ERRORRESPONSE");   #endif    if (portalsinflight->drained() && !readyforquerycount)    sendsync();    PD("%O ErrorResponse %O\n",    objectp(portal) && (portal._portalname || portal._preparedname),