[teiid-issues] [JBoss JIRA] (TEIID-2930) SCROLL keyword for DECLARE CURSOR not being parsed correctly

Johnathon Lee (JIRA) issues at jboss.org
Tue May 27 10:16:02 EDT 2014


     [ https://issues.jboss.org/browse/TEIID-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johnathon Lee reopened TEIID-2930:
----------------------------------



I have used isql and ODBC driver for RHEL5. 

I am not able to force isql to generate "..scroll cursor for..", however when I type the query[1] directly into isql, it is processed by teiid correctly. So the fix seems to be ok.

However the query[2] fails and teiid throws an exception[3]

Syntax "cursor with hold for" works correctly for the unpatched version of EDS 5.3.1 so I consider it as a regression. 


[1]  declare "SQL_CUR0x11ad4120" scroll cursor for select intNum from bqt2.smalla;fetch 100 in "SQL_CUR0x11ad4120"

[2] declare "SQL_CUR0xe61c20" cursor with hold for select * from pg_proc

[3] org.teiid.jdbc.TeiidSQLException: Direct usage of XQuery is no longer supported, use XMLQUERY instead.

> SCROLL keyword for DECLARE CURSOR not being parsed correctly
> ------------------------------------------------------------
>
>                 Key: TEIID-2930
>                 URL: https://issues.jboss.org/browse/TEIID-2930
>             Project: Teiid
>          Issue Type: Bug
>          Components: ODBC
>    Affects Versions: 7.7.8
>            Reporter: Johnathon Lee
>            Assignee: Steven Hawkins
>             Fix For: 7.7.9, 8.7.1, 8.8
>
>
> The DECLARE cursor is defined as [1]. However, in [2] line #155, the SCROLL keyword is not being matched.  Correction would be to match the pattern fully as defined in [1]
> [1]
> http://www.postgresql.org/docs/8.4/static/sql-declare.html
> [2]
> https://github.com/teiid/teiid/blob/master/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
> Example of error:
> TRACE [org.teiid.ODBC] (New I/O server worker #3-1) invoking server method: executeQuery [BEGIN;declare "SQL_CUR0x11ad4120" scroll cursor for <SQL QUERY>;fetch 100 in "SQL_CUR0x11ad4120"]
> DEBUG [org.teiid.ODBC] (New I/O server worker #3-1) Modified Query: START TRANSACTION
> FINER [org.teiid.jdbc] (New I/O server worker #3-1) Executing: requestID -1 commands: [START TRANSACTION] expecting: EITHER
> FINER [org.teiid.jdbc] (New I/O server worker #3-1) Executing as transaction statement
> TRACE [org.teiid.ODBC] (New I/O server worker #3-1) invoking client method: sendUpdateCount [BEGIN, 0]
> FINER [org.teiid.jdbc] (New I/O server worker #3-1) Executing: requestID -1 commands: [show client_encoding] expecting: RESULTSET
> FINER [org.teiid.jdbc] (New I/O server worker #3-1) Executing as show statement
> FINER [org.teiid.jdbc] (New I/O server worker #3-1) Creating ResultSet requestID: -1 beginRow: 1 resultsColumns: 1 parameters: 0
> TRACE [org.teiid.ODBC] (New I/O server worker #3-1) invoking client method: setEncoding [UTF-8]
> FINE  [org.teiid.jdbc] (New I/O server worker #3-1) Statement closed successfully.
> DEBUG [org.teiid.ODBC] (New I/O server worker #3-1) Modified Query: declare "SQL_CUR0x11ad4120" scroll cursor for <SQL QUERY>



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the teiid-issues mailing list