[libpostgresql-jdbc-java] 17/19: backpatch for rs.previous from Kris Jurka, reported by Andrew Fyfe
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL7_4_1
in repository libpostgresql-jdbc-java.
commit a67fb700d9992418fb5729c8b9d4c4ee55848bca
Author: Dave Cramer <davec at fastcrypt.com>
Date: Thu Dec 18 03:35:55 2003 +0000
backpatch for rs.previous from Kris Jurka, reported by Andrew Fyfe
---
org/postgresql/jdbc2/AbstractJdbc2ResultSet.java | 1 +
org/postgresql/test/jdbc2/ResultSetTest.java | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
index 3ebd764..bf2c027 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -493,6 +493,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
if (--current_row < 0)
return false;
this_row = (byte[][]) rows.elementAt(current_row);
+ rowBuffer = new byte[this_row.length][];
System.arraycopy(this_row, 0, rowBuffer, 0, this_row.length);
return true;
}
diff --git a/org/postgresql/test/jdbc2/ResultSetTest.java b/org/postgresql/test/jdbc2/ResultSetTest.java
index d7e621e..c09ac49 100644
--- a/org/postgresql/test/jdbc2/ResultSetTest.java
+++ b/org/postgresql/test/jdbc2/ResultSetTest.java
@@ -83,6 +83,16 @@ public class ResultSetTest extends TestCase
TestUtil.closeDB(con);
}
+ public void testBackward() throws Exception
+ {
+ Statement stmt = con.createStatement();
+ ResultSet rs = stmt.executeQuery("SELECT * FROM testrs");
+ rs.afterLast();
+ assertTrue(rs.previous());
+ rs.close();
+ stmt.close();
+ }
+
public void testAbsolute() throws Exception
{
Statement stmt = con.createStatement();
--
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