Bug 366970 - Crosstab report runs ODA query three times if the query returns zero rows
Summary: Crosstab report runs ODA query three times if the query returns zero rows
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Hao Zhou CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-16 14:04 EST by Mark Mising name CLA
Modified: 2011-12-29 00:55 EST (History)
1 user (show)

See Also:


Attachments
Test files (20.09 KB, application/zip)
2011-12-16 14:06 EST, Mark Mising name CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Mising name CLA 2011-12-16 14:04:10 EST
Build Identifier: v20110913-1734

I have built a custom ODA driver and if it is supplying data for a crosstab and its query returns no data, the ODA Query.prepare and execute methods are called three times. If the query returns one or more rows, the prepare and execute are called only once. My query that returns zero rows takes about a minute to run, so runing the report takes three minutes instead of just one.

For testing, I built a simple ODA driver using the instructions on the community forum. It logs messages to c:/temp/TestOdaQuery.txt.

Reproducible: Always

Steps to Reproduce:
1. Install the attached dummyoda plugin jars into a BIRT RCP designer's plugins folder
2. Launch the RCP designer and open the attached TestOdaCrosstab.rptdesign report design
3. Edit the data set and set the Query Text value to a number greater than 0 (the number of rows to return).
4. Preview the report.
5. Open the file c:/temp/TestOdaQuery.txt and notice that after the Initialized message, prepare and executeQuery methods are each logged once, as follows:

*** Initialized
Called Query.prepare() with queryText='5'
Called Query.executeQuery() with max rows=5

6. Close the file, edit the data set, and set the Query Text value to 0.
4. Preview the report.
5. Open the file c:/temp/TestOdaQuery.txt and notice that after the Initialized message, prepare and executeQuery methods are each logged three times as follows:

*** Initialized
Called Query.prepare() with queryText='0'
Called Query.executeQuery() with max rows=0
Called Query.prepare() with queryText='0'
Called Query.executeQuery() with max rows=0
Called Query.prepare() with queryText='0'
Called Query.executeQuery() with max rows=0
Comment 1 Mark Mising name CLA 2011-12-16 14:06:52 EST
Created attachment 208500 [details]
Test files

A zip file containing a dummy ODA plugin and a test report design.