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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:481:       private object pgsqlsess;    private int eoffound;    private conxion c;    private conxiin cr;    final mixed _delayederror;    final int _state;    final int _fetchlimit;    private int alltext;    final int _forcetext; +  private int syncparse;       final string _portalname;       private int rowsreceived;    private int inflight;    private int portalbuffersize;    private Thread.Mutex closemux;    private Thread.Queue datarows;    private array(mapping(string:mixed)) datarowdesc;    private array(int) datarowtypes; // types from datarowdesc
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:525:    _state,rowsreceived,eoffound,inflight,    _query,fd,_portalname,datarowtypes&&sizeof(datarowtypes),    statuscmdcomplete||(_unnamedstatementkey?"*parsing*":""));    break;    }    return res;    }       protected void create(object _pgsqlsess,conxion _c,string query,    int _portalbuffersize,int alltyped,array params,int forcetext, -  int _timeout) { +  int _timeout, int _syncparse) {    pgsqlsess = _pgsqlsess;    cr = (c = _c)->i;    _query = query;    datarows = Thread.Queue();    _ddescribe=Thread.Condition();    _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>);    }       //! Returns the command-complete status for this query.    //!    //! @seealso    //! @[affected_rows()]    //!    //! @note
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:867:    if(_tprepared && dontcacheprefix->match(_query))    m_delete(pgsqlsess->_prepareds,_query),_tprepared=0;    waitfordescribe();    }    if(_state>=CLOSING)    lock=_unnamedstatementkey=0;    else {    plugbuffer->add_int16(sizeof(datarowtypes));    if(sizeof(datarowtypes))    plugbuffer->add_ints(map(datarowtypes,oidformat),2); -  else if(!paralleliseprefix->match(_query)) { +  else if (syncparse || !paralleliseprefix->match(_query)) {    lock=pgsqlsess->_shortmux->lock();    if(pgsqlsess->_portalsinflight) {    pgsqlsess->_waittocommit++;    PD("Commit waiting for portals to finish\n");    catch(PT(pgsqlsess->_readyforcommit->wait(lock)));    pgsqlsess->_waittocommit--;    }    }    lock=0;    PD("Bind portal %O statement %O\n",_portalname,_preparedname);