Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit985e551

Browse files
author
Dave Cramer
committed
Applied Kris Jurkas patch to fix rollback and SQLException
1 parentd23fd95 commit985e551

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* <p>The lifetime of a QueryExecutor object is from sending the query
1717
* until the response has been received from the backend.
1818
*
19-
* $Id: QueryExecutor.java,v 1.18 2003/02/0409:20:08 barry Exp $
19+
* $Id: QueryExecutor.java,v 1.19 2003/02/0411:01:52 davec Exp $
2020
*/
2121

2222
publicclassQueryExecutor
@@ -189,14 +189,16 @@ private java.sql.ResultSet execute() throws SQLException
189189
*/
190190
privatevoidsendQuery()throwsSQLException
191191
{
192+
for (inti =0;i <m_binds.length ;i++ )
193+
{
194+
if (m_binds[i] ==null )
195+
thrownewPSQLException("postgresql.prep.param",newInteger(i +1));
196+
}
192197
try
193198
{
194199
pg_stream.SendChar('Q');
195200
for (inti =0 ;i <m_binds.length ; ++i)
196201
{
197-
if (m_binds[i] ==null)
198-
thrownewPSQLException("postgresql.prep.param (" +i +")",newInteger(i +1));
199-
200202
pg_stream.Send(connection.getEncoding().encode(m_sqlFrags[i]));
201203
pg_stream.Send(connection.getEncoding().encode(m_binds[i].toString()));
202204
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp