Applied Kris Jurkas patch to fix rollback and SQLException
This commit is contained in:
parent
d23fd9572b
commit
985e551b48
@ -16,7 +16,7 @@ import org.postgresql.jdbc1.AbstractJdbc1Statement;
|
|||||||
* <p>The lifetime of a QueryExecutor object is from sending the query
|
* <p>The lifetime of a QueryExecutor object is from sending the query
|
||||||
* until the response has been received from the backend.
|
* until the response has been received from the backend.
|
||||||
*
|
*
|
||||||
* $Id: QueryExecutor.java,v 1.18 2003/02/04 09:20:08 barry Exp $
|
* $Id: QueryExecutor.java,v 1.19 2003/02/04 11:01:52 davec Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class QueryExecutor
|
public class QueryExecutor
|
||||||
@ -189,14 +189,16 @@ public class QueryExecutor
|
|||||||
*/
|
*/
|
||||||
private void sendQuery() throws SQLException
|
private void sendQuery() throws SQLException
|
||||||
{
|
{
|
||||||
|
for ( int i = 0; i < m_binds.length ; i++ )
|
||||||
|
{
|
||||||
|
if ( m_binds[i] == null )
|
||||||
|
throw new PSQLException("postgresql.prep.param", new Integer(i + 1));
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pg_stream.SendChar('Q');
|
pg_stream.SendChar('Q');
|
||||||
for (int i = 0 ; i < m_binds.length ; ++i)
|
for (int i = 0 ; i < m_binds.length ; ++i)
|
||||||
{
|
{
|
||||||
if (m_binds[i] == null)
|
|
||||||
throw new PSQLException("postgresql.prep.param (" + i + ")", new Integer(i + 1));
|
|
||||||
|
|
||||||
pg_stream.Send(connection.getEncoding().encode(m_sqlFrags[i]));
|
pg_stream.Send(connection.getEncoding().encode(m_sqlFrags[i]));
|
||||||
pg_stream.Send(connection.getEncoding().encode(m_binds[i].toString()));
|
pg_stream.Send(connection.getEncoding().encode(m_binds[i].toString()));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user