Branch: Tag:

2012-04-10

2012-04-10 11:04:59 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Prevent infinite loop on reconnect when the first statement throws an error.

1681:   //! Forces text mode in communication with the database for queries on or off   //! for the query at hand. Potentially more efficient than the default   //! binary method for simple queries with small or no result sets. + //! Note that this mode causes all but the first query result of a list + //! of semicolon separated statements to be discarded.   //! @endmapping   //!   //! @returns
1821:    } // pgsql_result autoassigns to portal    else    tp=UNDEFINED; -  connectionclosed=0; +     for(;;) -  { .pgsql_util.pgsql_result(this,q,_fetchlimit, +  { connectionclosed=0; +  .pgsql_util.pgsql_result(this,q,_fetchlimit,    portalbuffersize,_alltyped,from,forcetext);    if(unnamedportalinuse)    portalname=PORTALPREFIX+(string)pportalcount++;