1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-18 17:41:14 +03:00

When moveToCurrentRow is called and the current row is off the

end of the ResultSet we can't try to load that row because it
doesn't exist and will throw an Exception.

Reported by Prasanth.
This commit is contained in:
Kris Jurka 2005-04-22 14:36:48 +00:00
parent 08008de909
commit f5517ddbda

View File

@ -9,7 +9,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group * Copyright (c) 2003, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.25.2.10 2005/04/18 18:25:11 jurka Exp $ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.25.2.11 2005/04/22 14:36:48 jurka Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -699,7 +699,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
throw new PSQLException( "postgresql.updateable.notupdateable" ); throw new PSQLException( "postgresql.updateable.notupdateable" );
} }
if (current_row < 0) { if (current_row < 0 || current_row >= rows.size()) {
this_row = null; this_row = null;
rowBuffer = null; rowBuffer = null;
} else { } else {