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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:363:    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;    while (portal = qportals->try_read())    if (objectp(portal))    portal->_purgeportal();    if(nostash) {    catch {    while(sizeof(closecallbacks))    foreach(closecallbacks;function(void|mixed:void) closecb;)    closecb();
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:541:    _ddescribe=Thread.Condition();    _ddescribemux=Thread.Mutex();    closemux=Thread.Mutex();    portalbuffersize=_portalbuffersize;    alltext = !alltyped;    _params = params;    _forcetext = forcetext;    _state = PORTALINIT;    timeout = _timeout;    gottimeout = _pgsqlsess->cancelquery; -  c->closecallbacks+=(<destroy>); +  c->closecallbacks+=(<_destruct>);    }       //! Returns the command-complete status for this query.    //!    //! @seealso    //! @[affected_rows()]    //!    //! @note    //! This function is PostgreSQL-specific, and thus it is not available    //! through the generic SQL-interface.
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1006:    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;    catch {    conxion plugbuffer=c->start(1);    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 plugbuffer) {    int flushmode;    PD("Execute portal %O fetchlimit %d\n",_portalname,fetchlimit);    if(!plugbuffer)    plugbuffer=c->start(1);