mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 01:31:14 +02:00
Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that absolute doesnt handle negative row numbers correctly.
This commit is contained in:
parent
6d7f1d3300
commit
961eb5716b
@ -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
|
//if index<0, count from the end of the result set, but check
|
||||||
//to be sure that it is not beyond the first index
|
//to be sure that it is not beyond the first index
|
||||||
if (index<0)
|
if (index<0) {
|
||||||
if (index>=-rows.size())
|
if (index>=-rows.size())
|
||||||
internalIndex=rows.size()+index;
|
internalIndex=rows.size()+index;
|
||||||
else {
|
else {
|
||||||
beforeFirst();
|
beforeFirst();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
//must be the case that index>0,
|
//must be the case that index>0,
|
||||||
//find the correct place, assuming that
|
//find the correct place, assuming that
|
||||||
//the index is not too large
|
//the index is not too large
|
||||||
@ -856,6 +856,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
|||||||
afterLast();
|
afterLast();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
current_row=internalIndex;
|
current_row=internalIndex;
|
||||||
this_row = (byte [][])rows.elementAt(internalIndex);
|
this_row = (byte [][])rows.elementAt(internalIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user