[libpostgresql-jdbc-java] 01/22: Fix for rollback SQLException from Kris Jurka

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL7_3_4
in repository libpostgresql-jdbc-java.

commit 531626801b4e09cf8b330683b8daa8d87cc9c159
Author: Dave Cramer <davec at fastcrypt.com>
Date:   Tue Feb 4 11:16:00 2003 +0000

    Fix for rollback SQLException from Kris Jurka
---
 org/postgresql/core/QueryExecutor.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/core/QueryExecutor.java b/org/postgresql/core/QueryExecutor.java
index 90696eb..4e02ff7 100644
--- a/org/postgresql/core/QueryExecutor.java
+++ b/org/postgresql/core/QueryExecutor.java
@@ -139,13 +139,18 @@ public class QueryExecutor
 	 */
 	private void sendQuery() throws SQLException
 	{
+		// check the binds before starting the query send process.
+		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
 		{
 			pg_stream.SendChar('Q');
 			for (int i = 0 ; i < m_binds.length ; ++i)
 			{
-				if (m_binds[i] == null)
-					throw new PSQLException("postgresql.prep.param", new Integer(i + 1));
 				pg_stream.Send(connection.getEncoding().encode(m_sqlFrags[i]));
 				pg_stream.Send(connection.getEncoding().encode(m_binds[i].toString()));
 			}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git



More information about the pkg-java-commits mailing list