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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:84:   private enum querystate {queryidle,inquery,cancelpending,canceled};   private querystate qstate;   private mapping(string:mapping(string:mixed)) prepareds=([]);   private int pstmtcount;   private int pportalcount;   private int totalhits;   private int cachedepth=1024; // Maximum cachecountsum for prepared statements,    // may be tuned by the application   private int timeout=4096; // Queries running longer than this number of    // seconds are canceled automatically - private int portalbuffersize=64*1024; // Approximate buffer per portal + private int portalbuffersize=32*1024; // Approximate buffer per portal   private int reconnected; // Number of times the connection was reset   #ifndef USEPGsql   private int flushed;   #endif      private string host, database, user, pass;   private int port;   private mapping(string:string) sessiondefaults=([]); // runtime parameters   private Thread.Mutex querymutex;   private Thread.Mutex stealmutex;
pike.git/lib/modules/Sql.pmod/pgsql.pike:1179:    PD("Execute portal %s fetchlimit %d\n",portalname,fetchlimit);    SENDCMD(({"E",plugint32(4+sizeof(portalname)+1+4),portalname,    "\0",plugint32(fetchlimit)}),1);    _portal->_inflight+=fetchlimit;   }      final private void sendclose() {    string portalname;    portalsinflight--;    if(_portal && (portalname=_portal->_portalname)) { -  int inflight=_portal->_inflight; +     _portal->_portalname = UNDEFINED;    _portal = UNDEFINED;   #ifdef DEBUGMORE    PD("Closetrace %O\n",backtrace());   #endif    if(!sizeof(portalname))    unnamedportalinuse--; -  if(/*sizeof(portalname)||inflight*/ 1) { +     PD("Close portal %s\n",portalname);    SENDCMD(({"C",plugint32(4+1+sizeof(portalname)+1),    "P",portalname,"\0"}),1);    _closesent=1;    }   } - } +       final private string trbackendst(int c) {    switch(c) {    case 'I':return "idle";    case 'T':return "intransaction";    case 'E':return "infailedtransaction";    }    return "unknown";   }