HHH-7068 - Cursor state not valid error from AS400

This commit is contained in:
Strong Liu 2012-04-09 18:58:35 +08:00
parent 4270b4777f
commit 3f6e6339d9
1 changed files with 1 additions and 10 deletions

View File

@ -1696,17 +1696,8 @@ public abstract class Loader {
boolean hasFirstRow = getFirstRow( selection ) > 0;
boolean useLimitOffset = hasFirstRow && useLimit && dialect.supportsLimitOffset();
boolean callable = queryParameters.isCallable();
final boolean canScroll = getFactory().getSettings().isScrollableResultSetsEnabled();
final boolean useScrollableResultSetToSkip = hasFirstRow &&
!useLimitOffset && canScroll;
final ScrollMode scrollMode = getScrollMode( scroll, hasFirstRow, useLimitOffset, queryParameters );
//
// if(canScroll && ( scroll || useScrollableResultSetToSkip )){
// scrollMode = scroll ? queryParameters.getScrollMode() : ScrollMode.SCROLL_INSENSITIVE;
// }else{
// scrollMode = null;
// }
if ( useLimit ) {
sql = dialect.getLimitString(
sql.trim(), //use of trim() here is ugly?