On Mon, May 05, 2003 at 07:32:25PM -0400, Joseph Shraibman wrote:
> Using this test case with 9000 interations I get this output:
>
> used: 474,296 free: 1,557,320 total: 2,031,616 max: 67,108,864
> ....................................................................................................
> used: 4,646,760 free: 3,643,544 total: 8,290,304 max: 67,108,864
> =================
> used: 4,607,728 free: 3,682,576 total: 8,290,304 max: 67,108,864
>
> I have no idea why this memory leak is happening. It only happens with this
> one select statement, not all select statements.
The "leak" is SQLWarning objects piling up on the (single) Connection object
you are using:
java.sql.SQLWarning: NOTICE: Adding missing FROM-clause entry in subquery for table "taba"
(intuitively I'd have thought these should appear on the Statement not the
Connection, but I haven't looked at the JDBC spec to check)
> line = "select (select pu from tabpu where pukey = taba.puindex and ukey = tabu.ukey) from tabu where ukey =
3and akey = 1;";
> Statement st = null;
> st = db.createStatement();
> ResultSet rs = st.executeQuery(line);
-O