Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Memory Leak with 5.0.6 and 5.1.2-beta

From: Clemens Eisserer <linuxhippy(at)gmail.com>
Date: Wed Jul 18 2007 - 18:18:01 EDT


Hello,

I am currently writing code that uses javax.sql.RowSet quite a lot and I am fighting with memory problems.
I've tons's of PreparedStatement-entries in com.mysql.jdbc.Connection in the openStatements HashMap.

It seems the problem only happens in a library I work on, I tried to create an isolated test-case (attached below) but this does not leak.

With the Postgres-8.2 jdbc driver the problem does not occur, I tested J/Connector versions 5.0.6 and 5.1.2-beta with mysql-5.1.20-beta server running on Linux.

Any ideas what could cause so many PreparedStatement in the openStatement's Map?

Thank you in advance, lg Clemens

Statement st = _ssConnection.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = st.executeQuery("Select * from firma WHERE firmennummer
> "+i+" order by firmennummer LIMIT 1;");
RowSet rowset = new JdbcRowSetImpl(rs);

rowset.getMetaData();
rowset.next();
rowset.getInt("firmennummer");
rowset.getString("name");

rs.close();
-- 
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 Wed Jul 18 18:18:15 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:24 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library