This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE Dev (Build 080731) VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Windows Vista, 6.0, x86 User Comments: Running a long query from the query designer causes this exception Stacktrace: java.lang.OutOfMemoryError: Java heap space at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1421) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2708) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:459) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2411) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1657) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2036)
Created attachment 66350 [details] stacktrace
One sure and easy way to reproduce this bug: 1.) Create the sakila demo MySQL database: http://dev.mysql.com/doc/sakila/en/sakila.html 2.) Open query designer 3.) drop any tables say: actor, film, film_actor and language 4.) Also add address which is not a related table 5.) Run the generated query. This causes an OutOfMemoryException after trying for sometime to get data for the query.
I ran into this elsewhere (in the SQL Editor I think). The problem is that the MySQL JDBC driver by default fetches *all* the rows from the database, and will happily run out of memory if the result set is large enough. Statement.setFetchSize() has no effect. I think as of MySQL 5.0 Statement.setFetchSize() works to throttle the number of rows fetched at a time. For more information see http://forums.mysql.com/read.php?39,137457,146876#msg-146876 and http://bugs.mysql.com/bug.php?id=8779. John, you can also contact Mark Matthews directly if need be. However, this doesn't solve things for the application code. The application writer working with a query that returns a lot of results will need to set fetch size in their code explicitly or risk running out of memory.
David if you have an SQL script that inserts lots of rows, could you email it to me or attach it if it's not too large. Thanks
I don't think I have such a script any more. What I did was write a JDBC program that inserts 100 rows in a batch and then just run it N times until you get enough data. We should probably put such a script on the Wiki once it's working, as this seems to come up pretty regularly. David
John, can you please evaluate this issue. Do you plan to fix it in 6.5? The Sakila plugin should give you what you need to reproduce.
We were not able to get to these issues before code freeze - changing target milestone to 'future'
Move visualsqleditor subcomponents below visualweb