4 messages in com.mysql.lists.javaRe: setFetchSize()
FromSent OnAttachments
Israel Olalla18 Sep 2002 05:03 
Mark Matthews18 Sep 2002 05:53 
Israel Olalla18 Sep 2002 06:57 
Mark Matthews18 Sep 2002 08:55 
Subject:Re: setFetchSize()
From:Mark Matthews (ma@mysql.com)
Date:09/18/2002 08:55:40 AM
List:com.mysql.lists.java

Israel Olalla wrote:

Hi,

I fully agree with you it's required to be JDBC-compliant but.... its: rows <=
this.getMaxRows() || (rows < 0 && rows != Integer.MIN_VALUE)) instead of : rows
> this.getMaxRows() || (rows < 0 && rows != Integer.MIN_VALUE))

I am sorry if i didn't explain correctly :-)

I'm confused. The JDBC specs state that "0 <= rows <= this.getMaxRows()"

Which means rows has to be 0 or less-than-or-equal to getMaxRows().

The corollary, which is what the statement checks for and throws an exception if met is:

rows > getMaxRows() (which means that rows <= getMaxRows() is not met)

or

rows < 0 && rows != Integer.MIN_VALUE (which means that rows >= 0, with the special case of rows == Integer.MIN_VALUE which triggers the driver to "stream" result sets).

To flip the question around, what exactly are you doing with the driver that is not working as you expect, rather than trying to determine if the test is incorrect (which it doesn't appear to be)?

-Mark