Skip site navigation (1) Skip section navigation (2)

Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and

From: Martin Holz <holz(at)fiz-chemie(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and
Date: 2004-01-16 07:38:07
Message-ID: 83fzegcpi8.fsf@bog.darkzone.fiz-chemie.de (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-jdbc
Kris Jurka <books(at)ejurka(dot)com> writes:

> On Wed, 7 Jan 2004, Martin Holz wrote:
> 
> > Hello,
> >
> > org.postgresql.jdbc1.AbstractJdbc1Statement.setBinaryStream()
> > in postgresql 7.4.1 wrongly assumes, that
> > java.io.InputStream.read(byte[] b,int offset,int len )
> > will always read len bytes. InputStream only guarantees to
> > return at least 1 byte per call. The attached patch solves the bug.
> >
> 
> I have applied a version of this patch to the cvs version on gborg.  The
> setAsciiStream and setUnicodeStream methods also had this problem. 

Thank you. Why does it not show up at 
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java ?

>  Your
> patch was not quite right because it didn't correctly handle the situation
> where the Stream was longer than the given length.
> 
You are right.




In response to

Responses

pgsql-bugs by date

Next:From: Kris JurkaDate: 2004-01-16 08:47:47
Subject: Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and
Previous:From: Dennis BjorklundDate: 2004-01-15 22:16:01
Subject: Re: NULL in arrays

pgsql-jdbc by date

Next:From: Erwan ArzurDate: 2004-01-16 08:15:06
Subject: Re: problem to connect to database
Previous:From: Paul ThomasDate: 2004-01-15 18:52:32
Subject: Re: problem to connect to database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group