Hi,
I walked against a prob in informix (and probably more databases) wich has to do with maxNumber-support and truncating the resultset .
BasicQueryHandler.readNodes should trucate results to maxNumber, if the databaseHandler supports maxNumber, but shouldn't it always truncate the results if the maxNumber is set? And what happens if the DatabaseHandler doesn't support max at all?
In informix specifically, maxNumber-support is set to true, but in the case of a UNION query, max (SELECT FIRST n) cannot be used (stupid informix). So here we are dependent on the fallback in BasicQueryHandler.readNodes, which - poorly - never trucates the results :-(, because maxNumber-support is set to true.
Possible solution can be to drop the "sqlHandlerSupportsMaxNumber" condition and extend the while a little in all the readNodes methods:
// Truncate results to provide weak support for maxnumber
while (rs.next() && (maxNumber>results.size() || maxNumber==-1)) {
...
}Is it ok to check this in as a fix ?
Regards,
Mark
