[teiid-issues] [JBoss JIRA] (TEIID-2992) MongoDB: Offset clause causes MongoDB to crash
Ramesh Reddy (JIRA)
issues at jboss.org
Fri Jun 6 09:22:16 EDT 2014
[ https://issues.jboss.org/browse/TEIID-2992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974149#comment-12974149 ]
Ramesh Reddy commented on TEIID-2992:
-------------------------------------
Did not realize there is also OFFSET based option where LIMIT number is optional, will correct it
> MongoDB: Offset clause causes MongoDB to crash
> ----------------------------------------------
>
> Key: TEIID-2992
> URL: https://issues.jboss.org/browse/TEIID-2992
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4.1
> Environment: MongoDB < 2.5.2
> Reporter: Filip Elias
> Assignee: Ramesh Reddy
>
> MongoDB(version < 2.5.2) will crash when offset clause is used in SQL query.
> Althought the bug[1] is in MongoDB (Adding big number into $limit causes Mongodb to shutdown), it is also caused by teiid because it adds max integer into $limit which seems to be unnecessary.
> Sample query:
> {code}
> SELECT INTKEY FROM bqt1.smalla ORDER BY INTKEY OFFSET 45 ROWS
> {code}
> Generated mongo command:
> {code}
> { aggregate: "smalla", pipeline: [ { $project: { c_0: "$INTKEY" } }, { $sort: { c_0: 1 } }, { $skip: 45 }, { $limit: 2147483647 } ] }
> {code}
> [1] https://jira.mongodb.org/browse/SERVER-10136
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
More information about the teiid-issues
mailing list