Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321095

Summary: Query being run twice for sybase jConnect
Product: z_Archived Reporter: john mcteague <john.mcteague>
Component: BIRTAssignee: Zhang Lei <LZhang>
Status: VERIFIED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, john.mcteague
Version: 2.5.1   
Target Milestone: 3.7.0 M7   
Hardware: All   
OS: All   
Whiteboard: Obsolete
Attachments:
Description Flags
The modified config.xml
none
Sample report. none

Description john mcteague CLA 2010-07-28 04:12:38 EDT
Build Identifier: 20090920-1017

Running reports using legacy stored procs that self audit shows that the query(s) are being executed twice for each report.

A little digging shows that jConnect is listed under policy type 2 in oda-jdbc.jar/config.xml which means the query is first executed with a max rows of 1, metadata obtained and then executed again with the correct max rows value to get the full resultset.

I modified config.xml to put jConnect in policy type 1 which means the query is executed, result sets cached, metadata obtained and then the result set used later.

I have (thus far) not seen any issue with this.

I am looking to find out why jConnect is set to policy type 2 in the first place and whether moving to 1 will have any consequences. If there are none, can it be moved to policy 1 permanently?

Reproducible: Always
Comment 1 john mcteague CLA 2010-07-28 04:14:17 EDT
Created attachment 175376 [details]
The modified config.xml
Comment 2 john mcteague CLA 2010-07-28 04:16:39 EDT
I am using jConnect3 v6.0.5 and jConnect2 v5.5 drivers to test this. Both exhibit the same behaviour.
Comment 3 john mcteague CLA 2010-07-28 04:19:53 EDT
Created attachment 175377 [details]
Sample report.

Attached sample report. Inserts into a table called AUDIT_LOG and then queries sysobjects.
Comment 4 Zhang Lei CLA 2011-04-28 03:35:47 EDT
move jConnect to policy category 1. fix this issue.
Comment 5 Xiaoying Gu CLA 2011-04-28 03:45:40 EDT
Verified in daily build 3.7.0.20110427