Thread and memory leak "derby.rawStoreDaemon" with Report "Use As View"
Reports that are based on views created by saving a report with "Use As View" leave behind threads named "derby.rawStoreDaemon" when the report has an error (e.g. division by zero).
Steps to reproduce:
1. Run this in your database:
create table test_report_as_view_memory_leak ( x int, y int );
insert into test_report_as_view_memory_leak values (10,1), (20,2), (30,0);
2. Create a simple view that reads this new table
3. Create a report that reads this view, save with "Use As View" enabled
4. Create a report based on view from step 3
5. Add calculated field with formula "x / y", add it into the report
6. Check out "Output" screen of the report
7. Observe new hanging "derby.rawStoreDaemon" thread each time Output is clicked (report refreshed)
8. Observe heap memory usage going up and GC not being able to free it up