[teiid-issues] [JBoss JIRA] (TEIID-2020) Running Sybase procedure with jconnect driver in Teiid fails
Steven Hawkins (JIRA)
jira-events at lists.jboss.org
Mon Apr 30 15:11:17 EDT 2012
[ https://issues.jboss.org/browse/TEIID-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-2020.
-----------------------------------
Fix Version/s: 8.0
Resolution: Done
There are a couple of issues here:
1. added a check in RecordFactory to ensure that only valid parameter types are used (should be corrected by TEIIDDES-1341).
2. a stored procedure with no result set and a return parameter not called using a CallableStatement results in an exception reading the results. The fix was made to ConnectorWorkItem to pick up the correct number of expected non-parameter columns.
3. Using the jconnect driver and using a callablestatement results in the error shown in the case if setFetchSize is called on the statement. The fix here was to add a method onto the ExecutionFactory to set conditionally set the fetch size.
For back-porting, the first changes are fine. The last however adds an executionproperty and changes the constructor of BaseJDBCExecution. For an older branch a narrower fix may be appropriate.
> Running Sybase procedure with jconnect driver in Teiid fails
> ------------------------------------------------------------
>
> Key: TEIID-2020
> URL: https://issues.jboss.org/browse/TEIID-2020
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.4.1
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
> Fix For: 8.0
>
> Attachments: Sybase_test.vdb, Sybase_test.zip
>
>
> In the attached Sybase_test.zip Model project set, run the following against the Sybase_test.vdb
> exec sp_rows_between(1,6,'SmallA')
> You'll receive the below error:
> [TranslatorException] ZZZZZ: Error Code:ZZZZZ Message:'{ ?= call sp_rows_between(?,?,?)}' error executing statement(s): {1}
> 1 [SybSQLException]Execute cursor 'jconnect_implicit_3' is declared on a procedure which contains a non-SELECT or a SELECT with a COMPUTE clause. For the declaration of this cursor to be legal it should have a single SELECT statement without a COMPUTE clause.
> at org.teiid.translator.jdbc.JDBCProcedureExecution.execute(JDBCProcedureExecution.java:70)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:264)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:338)
> at org.teiid.dqp.internal.process.DataTierTupleSource.access$000(DataTierTupleSource.java:80)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:138)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:135)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:121)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:230)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: com.sybase.jdbc3.jdbc.SybSQLException: Execute cursor 'jconnect_implicit_3' is declared on a procedure which contains a non-SELECT or a SELECT with a COMPUTE clause. For the declaration of this cursor to be legal it should have a single SELECT statement without a COMPUTE clause.
> at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
> I can use DBVisualizer and the same jConnect driver and run the exact same procedure with correct results.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the teiid-issues
mailing list