[teiid-issues] [JBoss JIRA] Commented: (TEIID-1283) Race condition results in bad resultset for query on union

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Fri Oct 1 13:47:39 EDT 2010


    [ https://jira.jboss.org/browse/TEIID-1283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12554717#action_12554717 ] 

Steven Hawkins commented on TEIID-1283:
---------------------------------------

In your example, is r.next returning true with the very next getString call failing?  That should never happen regardless of the underlying plan.  Then next call should only return true if the row has been loaded by the client otherwise it will block until the next or no more rows are available.

Can you provide more of your JDBC code and the query plan from "set showplan on"?

> Race condition results in bad resultset for query on union
> ----------------------------------------------------------
>
>                 Key: TEIID-1283
>                 URL: https://jira.jboss.org/browse/TEIID-1283
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.1
>         Environment: MaxOS 10.6.4, JBoss 5.1.0
>            Reporter: Howard Abrams
>            Assignee: Steven Hawkins
>
> Take a table, call it 'A', in a physical model backed by a database (DB2 on Z/OS in this case)
> Take a view, call it 'B', backed by a file connector
> From JDBC, make the query:
> Select * from (select * from A union select * from B) where foo='bar'. 
> where 'bar' is only found in B, not A.
> Execute the query get back a resultset:
> ResultSet r = statement.executeQuery();
> but this code will fail with a "resultset cursor is after the last row"
> if ( r.next )
> String foo = r.getString(1);
> but this code will work correctly:
> Thread.sleep(1000);
> if ( r.next )
> String foo = r.getString(1);
> Putting the union in a materialized view also works.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list