Community
Participate
Working Groups
Build Identifier: 20100617-1415 I am using Eclipse BIRT Report Designer 2.6.1RC3 to connect to a mysql 5.1 server using com.mysql.jdbc.Driver (v5.1). When an error occurs in the Edit Data Set dialog then I observe that connections to the mysql database are leaked. I am observing the leaks by issuing a "show processlist;" command on the server and seeing the number of connections increasing over time. Examples of errors that trigger this are queries containing SQL parameters '?' that have not been configured, and mandatory parameters that are missing a value. The later case occurs very frequently for me, since although I have set default values, the report designer seems to loose these under some as yet undetermined circumstances (I will raise another bug on this if I can track it down to a reproducible case). I rate the severity of this issue as high; as an example in one hour of use of the report designer sufficient connections had been leaked to exhaust my server of all available connections (180), causing an inadvertent denial of service for all other users. A work-around is to fully exit Eclipse, which causes all the leaked connections to be closed. Reproducible: Always Steps to Reproduce: 1. Establish yourself a mysql database (an SQL script to create a sample "booksdb" database is attached). 2. In report designer, create a new report. 2. Create a Data Source to this database using a mysql connector. 3. Create a Data Set to this datasource. The query I used was: select title, price from books where price < ? Do not configure any parameters (to deliberately cause the query to fail). Click Finish. A sequence of two errors will be reported; click through these. Eventually the Edit Data Source dialog opens. 4. Click Ok to close the Edit Data Source dialog. An error is reported. Click through this too. 5. Log onto your mysql server and issue "show processlist;". Note that there appear to already be a number of leaked connections. 6. Open the Edit Data Set dialog again, preview the query (this will fail), and click Ok to close the dialog. 7. Again issue "show processlist;" on the mysql server and observe that the number of connections has again increased, sometimes by one and sometimes by four. 8. Repeat steps 6 to 7 to cause more leaks...
Created attachment 179166 [details] Set of mysql commands to create a sample database. I run this script as: mysql -u <username> < books.sql
*** Bug 334728 has been marked as a duplicate of this bug. ***
The cause is that some shutdown or close operations are not in finally block in many cases in UI code. Fixed.
Verified in 2.6.2-20110219. Set as verified.