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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:445:    return replace(glob, ({"*", "?", "\\", "%", "_"}),    ({"%", "_", "\\\\", "\\%", "\\_"}));   }      private void waitauthready() {    if (proxy.waitforauthready) {    PD("%d Wait for auth ready %O\n",    proxy.c?->socket && proxy.c->socket->query_fd(), backtrace()[-2]);    Thread.MutexKey lock = proxy.shortmux->lock();    catch(PT(proxy.waitforauthready->wait(lock))); -  lock = 0; +     PD("%d Wait for auth ready released.\n",    proxy.c?->socket && proxy.c->socket->query_fd());    }   }      //! Closes the connection to the database, any running queries are   //! terminated instantly.   //!   //! @note   //! This function is PostgreSQL-specific.
pike.git/lib/modules/Sql.pmod/pgsql.pike:1075: Inside #if defined(PG_STATS)
   portal._tprepared = tp;   #ifdef PG_STATS    portalsopened++;   #endif    proxy.clearmessage = 1;    if (forcetext) { // FIXME What happens if portals are still open?    portal._unnamedportalkey = proxy.unnamedportalmux->lock(1);    portal._portalname = "";    portal->_parseportal(); portal->_bindportal();    proxy.readyforquerycount++; +  {    Thread.MutexKey lock = proxy.unnamedstatement->lock(1);    .pgsql_util.conxsess cs = c->start(1);    CHAIN(cs)->add_int8('Q')->add_hstring(({q, 0}), 4, 4);    cs->sendcmd(FLUSHLOGSEND, portal); -  lock = 0; +  }    PD("Simple query: %O\n", q);    } else {    object plugbuffer;    portal->_parseportal();    if (!sizeof(preparedname) || !tp || !tp.preparedname) {    if (!sizeof(preparedname))    preparedname=    (portal._unnamedstatementkey = proxy.unnamedstatement->trylock(1))    ? "" : PTSTMTPREFIX+int2hex(ptstmtcount++);    PD("Parse statement %O=%O\n", preparedname, q);