| From: | Joseph Shraibman <jks(at)p1(dot)selectacast(dot)net> | 
|---|---|
| To: | Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk> | 
| Cc: | "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: jdbc 7.0 fix for off by one errors. | 
| Date: | 2000-05-15 17:38:16 | 
| Message-ID: | 39203607.3F069C3B@selectacast.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-interfaces | 
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(at)p1(dot)selectacast(dot)net]
> Sent: Thursday, May 11, 2000 8:18 PM
> To: pgsql-interfaces(at)postgreSQL(dot)org; pgsql-hackers(at)postgresql(dot)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 <jks(at)selectacast(dot)net>
> >  //current_row = rows.size() + 1;
> >  if (rows.size() > 0)
> >      current_row = rows.size();
> >    }
> 804,805c805,808
> <     {
> <  current_row = 0;
> ---
> >     {//fixed by Joseph Shraibman <jks(at)selectacast(dot)net>
> >  //current_row = 0;
> >  if (rows.size() > 0)
> >      current_row = -1;
> 949c952
> <  return current_row;
> ---
> >  return current_row + 1;//fixed by Joseph Shraibman
> <jks(at)selectacast(dot)net>
> 967c970,972
> <
> ---
> >     /**
> >      * @author Joseph Shraibman <jks(at)selectacast(dot)net>
> >      */
> 970,972c975,980
> <  throw org.postgresql.Driver.notImplemented();
> <     }
> <
> ---
> >  //throw org.postgresql.Driver.notImplemented();
> >  return (current_row >= rows.size()  && rows.size() > 0);
> >    }
> >     /**
> >      * @author Joseph Shraibman <jks(at)selectacast(dot)net>
> >      */
> 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 <jks(at)selectacast(dot)net>
> >      */
> 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();
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joseph Shraibman | 2000-05-15 17:42:24 | Re: [HACKERS] RE: jdbc 7.0 fix for off by one errors. | 
| Previous Message | Peter Mount | 2000-05-15 14:16:37 | RE: lo_unlink |