Commit 961eb571 authored by Peter Mount's avatar Peter Mount

Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that...

Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that absolute doesnt handle negative row numbers correctly.
parent 6d7f1d33
......@@ -839,14 +839,14 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
//if index<0, count from the end of the result set, but check
//to be sure that it is not beyond the first index
if (index<0)
if (index<0) {
if (index>=-rows.size())
internalIndex=rows.size()+index;
else {
beforeFirst();
return false;
}
} else {
//must be the case that index>0,
//find the correct place, assuming that
//the index is not too large
......@@ -856,6 +856,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
afterLast();
return false;
}
}
current_row=internalIndex;
this_row = (byte [][])rows.elementAt(internalIndex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment