RE: Serious OutOfMemory issue while reading with mysql-connector-j-5.0.7 ... -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> -----Original Message----- > From: Paul Palaszewski [mailto:paul.palaszewski@bdm-systems.com] > Sent: Friday, August 31, 2007 5:35 AM > To: Mark Matthews > Cc: java@lists.mysql.com > Subject: Re: Serious OutOfMemory issue while reading with > mysql-connector-j-5.0.7 ... > > Hi Mark! > > Big thanks for your detailed response. I've tested with Connector/J > 5.0.3 + 5.0.7 and debugged 5.0.7.
[snip]
> As you suggested, setting fetchSize to Integer.MIN_VALUE > fixed the OutOfMemoryException. During my first the debug > session I've seen the MIN_VALUE, but I've had a look at the > javadoc for setFetchSize which states ... > * @exception SQLException if a database access error > occurs, or the > * condition 0 <= <code>rows</code> <= > <code>this.getMaxRows()</code> > * is not satisfied. > * @since 1.2 > > So I would never have tried setting something which should > cause a SQLException. I've assumed, that the MIN_VALUE is > only used internally. > Does anyone have ideas, how this could be made more intuitive > without breaking compatibility?
Hi Paul,
The JDBC-compliant way to do this is to cast your statement to com.mysql.jdbc.Statement and call .enableStreamingResults() on it.
(The JDBC spec states that "vendor extensions" can be created by adding methods to the JDBC interface.)
If you're using a connection pool, there's usually a method to get to the "underlying" connection to use such methods.
-Mark
- --
Mark Matthews, Architect (Client Connectivity)
MySQL, Inc. Chicago, USA - www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
iD8DBQFG2ByQtvXNTca6JD8RAlAHAJ4nLSB+whi/Ras/FwurBqYpadTUjQCgsBn/
fTSyvE9z85ZD0hbC3bctfkA=
=x2Ov
-----END PGP SIGNATURE-----
--
MySQL Java Mailing List
For list archives:
http://lists.mysql.com/java
To unsubscribe:
http://lists.mysql.com/java?unsub=lists@pantek.com
Received on Fri Aug 31 09:58:02 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 10:14:16 EDT
|