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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:475:   //! Sets the new timeout for long running queries.   //!   //! @returns   //! The previous timeout.   //!   //! @note   //! This function is PostgreSQL-specific, and thus it is not available   //! through the generic SQL-interface.   /*semi*/final int settimeout(void|int newtimeout) {    int oldtimeout=timeout; -  if(!undefinedp(newtimeout) && newtimeout>0) { +  if(!undefinedp(newtimeout) && newtimeout>0)    timeout=newtimeout; -  if(c) -  c->timeout=timeout; -  } +     return oldtimeout;   }      //! @param newportalbuffersize   //! Sets the new portalbuffersize for buffering partially concurrent queries.   //!   //! @returns   //! The previous portalbuffersize.   //!   //! @note
pike.git/lib/modules/Sql.pmod/pgsql.pike:690:    };    case 'R': {    PD("Authentication ");    string sendpass;    msglen-=4+4;    int authtype=cr->read_int32();    switch(authtype) {    case 0:    PD("Ok\n");    .pgsql_util.local_backend->remove_call_out(reconnect); -  cr->gottimeout=cancelquery; -  cr->timeout=timeout; +     reconnectdelay=0;    cancelsecret="";    break;    case 2:    PD("KerberosV5\n");    errtype=PROTOCOLUNSUPPORTED;    break;    case 3:    PD("ClearTextPassword\n");    sendpass=pass;
pike.git/lib/modules/Sql.pmod/pgsql.pike:1864:    if(sizeof(plugbuffer)) {    PD("%O\n",(string)plugbuffer);    plugbuffer->sendcmd(FLUSHSEND); // close expireds    } else    plugbuffer->sendcmd(KEEP); // close start()    tstart=gethrtime();    } else // sql_result autoassigns to portal    tp=UNDEFINED;    .pgsql_util.sql_result portal;    portal=.pgsql_util.sql_result(this,c,q, -  portalbuffersize,_alltyped,from,forcetext); +  portalbuffersize,_alltyped,from,forcetext,timeout);    portal._tprepared=tp;   #ifdef PG_STATS    portalsopened++;   #endif    clearmessage=1;    if(forcetext) { // FIXME What happens if portals are still open?    portal._unnamedportalkey=_unnamedportalmux->lock(1);    portal._portalname="";    portal->_openportal();    _readyforquerycount++;