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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:430:    i->fillread=0;    }    lock=0;    PD("%d>Delayed close, flush write\n",socket->query_fd());    i->read_cb(socket->query_id(),0);    return 0;    } else    return -1;    }    -  protected void destroy() { +  protected void _destruct() {    PD("%d>Close conxion %d\n", socket ? socket->query_fd() : -1, !!nostash);    int|.pgsql_util.sql_result portal;    if (qportals) // CancelRequest does not use qportals    while (portal = qportals->try_read())    if (objectp(portal))    portal->_purgeportal();    if(nostash) {    catch {    while(sizeof(closecallbacks))    foreach(closecallbacks;function(void|mixed:void) closecb;)
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:643:    _ddescribemux=Thread.Mutex();    closemux=Thread.Mutex();    portalbuffersize=_portalbuffersize;    alltext = !alltyped;    _params = params;    _forcetext = forcetext;    _state = PORTALINIT;    timeout = _timeout;    syncparse = _syncparse;    gottimeout = _pgsqlsess->cancelquery; -  c->closecallbacks+=(<destroy>); +  c->closecallbacks+=(<_destruct>);    transtype = _transtype;    }       //! Returns the command-complete status for this query.    //!    //! @seealso    //! @[affected_rows()]    //!    //! @note    //! This function is PostgreSQL-specific, and thus it is not available
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1178:    if(!datarowtypes) {    Thread.MutexKey lock=_ddescribemux->lock();    datarowtypes=emptyarray;    datarowdesc=emptyarray;    _ddescribe->broadcast();    lock=0;    }    }       final void _releasesession(void|string statusccomplete) { -  c->closecallbacks-=(<destroy>); +  c->closecallbacks-=(<_destruct>);    if(statusccomplete && !statuscmdcomplete)    statuscmdcomplete=statusccomplete;    inflight=0;    conxsess plugbuffer;    if (!catch(plugbuffer = c->start()))    plugbuffer->sendcmd(_closeportal(plugbuffer));    _state=CLOSED;    datarows->write(1); // Signal EOF    releaseconditions();    }    -  protected void destroy() { +  protected void _destruct() {    catch { // inside destructors, exceptions don't work    _releasesession();    };    }       final void _sendexecute(int fetchlimit,void|bufcon|conxsess plugbuffer) {    int flushmode;    PD("Execute portal %O fetchlimit %d transtype %d\n", _portalname,    fetchlimit, transtype);    if(!plugbuffer)