Received: from p1.selectacast.net (IDENT:root@p1.selectacast.net [206.41.1.251]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA82680; Mon, 15 May 2000 13:38:21 -0400 (EDT) (envelope-from jks@p1.selectacast.net) Received: from selectacast.net (IDENT:jks@d1 [209.219.91.66]) by p1.selectacast.net (8.9.3/8.9.3) with ESMTP id NAA06258; Mon, 15 May 2000 13:38:16 -0400 Message-ID: <39203607.3F069C3B@selectacast.net> Date: Mon, 15 May 2000 13:38:16 -0400 From: Joseph Shraibman Organization: Xtenit X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.13 i686) X-Accept-Language: en MIME-Version: 1.0 To: Peter Mount CC: "pgsql-interfaces@postgreSQL.org" , pgsql-hackers@postgresql.org Subject: Re: jdbc 7.0 fix for off by one errors. References: <1B3D5E532D18D311861A00600865478C70C5BD@exchange1.nt.maidstone.gov.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/1 Peter Mount wrote: > Now I've seen this, I remember putting it in. If someone else hasn't > done it yet I'll do it now. > Momjian put it in on friday after I submitted it to the patches list. I would have submitted it there first, but there are so many lists I can't keep track of them all :s Anyway, it's in. > > Peter > > -- > Peter Mount > Enterprise Support > Maidstone Borough Council > Any views stated are my own, and not those of Maidstone Borough Council. > > -----Original Message----- > From: Joseph Shraibman [mailto:jks@p1.selectacast.net] > Sent: Thursday, May 11, 2000 8:18 PM > To: pgsql-interfaces@postgreSQL.org; pgsql-hackers@postgresql.org > Subject: [INTERFACES] jdbc 7.0 fix for off by one errors. > > Peter, not only didn't you fix the off by one errors in ResultSet from > 6.5.3, you added more! > > I'm including a diff of > postgresql-7.0/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java. > I've clearly marked all the fixes I did. Would *someone* who has access > to the cvs please put this in? > > ====================== > > 8d7 > < > 799,801c798,802 > < { > < current_row = rows.size() + 1; > < } > --- > > {//fixed by Joseph Shraibman > > //current_row = rows.size() + 1; > > if (rows.size() > 0) > > current_row = rows.size(); > > } > 804,805c805,808 > < { > < current_row = 0; > --- > > {//fixed by Joseph Shraibman > > //current_row = 0; > > if (rows.size() > 0) > > current_row = -1; > 949c952 > < return current_row; > --- > > return current_row + 1;//fixed by Joseph Shraibman > > 967c970,972 > < > --- > > /** > > * @author Joseph Shraibman > > */ > 970,972c975,980 > < throw org.postgresql.Driver.notImplemented(); > < } > < > --- > > //throw org.postgresql.Driver.notImplemented(); > > return (current_row >= rows.size() && rows.size() > 0); > > } > > /** > > * @author Joseph Shraibman > > */ > 974,975c982,984 > < { > < throw org.postgresql.Driver.notImplemented(); > --- > > { > > return (current_row < 0 && rows.size() > 0); > > //throw org.postgresql.Driver.notImplemented(); > 977c986,988 > < > --- > > /** > > * @author Joseph Shraibman > > */ > 980c991,992 > < throw org.postgresql.Driver.notImplemented(); > --- > > return (current_row == 0 && rows.size() >= 0); > > //throw org.postgresql.Driver.notImplemented(); > 985c997,998 > < throw org.postgresql.Driver.notImplemented(); > --- > > return (current_row == rows.size() -1 && rows.size() > 0); > > //throw org.postgresql.Driver.notImplemented();