[teiid-issues] [JBoss JIRA] (TEIID-2992) MongoDB: Offset clause causes MongoDB to crash
Ramesh Reddy (JIRA)
issues at jboss.org
Fri Jun 6 10:32:15 EDT 2014
[ https://issues.jboss.org/browse/TEIID-2992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramesh Reddy resolved TEIID-2992.
---------------------------------
Labels: Beta1 (was: )
Fix Version/s: 8.7.1
8.8
Resolution: Done
The translation from query to API language objects were defaulting the limit at INT_MAX during the translation. Added explicit check in the MongoDB query parser to check for INT_MAX and skip setting the value if it matches.
> 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
> Labels: Beta1
> Fix For: 8.7.1, 8.8
>
>
> 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