History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SQL-8
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Bob Swift
Reporter: Andy Brook
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Confluence SQL Plugin

SQL plugin doesnt appear to be able to pull more than basic table information

Created: 23/Jan/07 11:22 AM   Updated: 13/May/07 09:06 AM
Component/s: SQL macro
Affects Version/s: 3.0
Fix Version/s: 3.2

Time Tracking:
Not Specified

File Attachments: 1. Java Archive File sql-plugin-3.2.jar (78 kb)

Environment: Linux, Ubuntu 6.10 (Debian derivative), X86_64, DB2 community edition 9.1, JBOSS4.05, SUN Java 1.5.0_10, confluence 2.3

Labels:


 Description  « Hide
Im not sure this is a bug with the plugin code, but its also a for-info issue:-

I have confluence 2.3 running fine. I got the sql plugin up and running with jboss datasources and the following works fine

{sql:dataSource=java:ConfluenceDS}
select * from ATTACHMENTS{sql}

If I try and do more, eg:

{sql:dataSource=java:ConfluenceDS}
select count from CONF.ATTACHMENTS group by contenttype{sql}

I get an error:
sql: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: SQL_CURSH200C1
select count from ATTACHMENTS group by contenttype

From http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzala/rzalaco.htm
I get 'A SENSITIVE cursor cannot be defined for the specified select-statement.', leading to
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaha/Sensitive2.htm?resultof=%22%43%75%72%73%6f%72%22%20%22%63%75%72%73%6f%72%22%20%22%53%65%6e%73%69%74%69%76%69%74%79%22%20%22%73%65%6e%73%69%74%22%20%22%45%78%63%65%70%74%69%6f%6e%22%20%22%65%78%63%65%70%74%22%20

Pertienent code being:

if (sensitivity.equalsIgnoreCase("insensitive")) { System.out.println("creating a TYPE_SCROLL_INSENSITIVE cursor"); s = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); } else { System.out.println("creating a TYPE_SCROLL_SENSITIVE cursor"); s = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); }

Is this specific to DB2? or is DB2 just being picky? Would making the statement scroll insensitive affect other dbs?

I've got a copy of the code and hope to play with this, If you have any input Im all ears!



 All   Comments   Work Log   Change History   FishEye   Crucible   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Bob Swift - 26/Jan/07 06:34 PM
Just saw this now... must have missed it in my email.
Yes, scroll sensitive was put in a while ago to support horizontal row data.
May need to make that optional or something...don't know. I will investigate more later.

Bob Swift - 27/Jan/07 05:30 PM
I think it is database dependent. Works ok on db2 for i5 and others.
I am thinking I should change to INSENSITIVE and also condition the setting of these parameters only if a scrollable cursor is needed.

Bob Swift - 28/Jan/07 08:58 AM
pre-release version that
1) uses INSENSITIVE cursor
2) avoids a scrollable cursor unless rowOrientation = horizontal

Bob Swift - 13/May/07 09:06 AM
Forgot to close this with 3.2