HHH-3873 DB2Dialect.getLimitString raise DB2 error message when called with limit=0
This commit is contained in:
parent
f0967db638
commit
ca009f5340
|
@ -59,6 +59,9 @@ public class DB2390Dialect extends DB2Dialect {
|
|||
if ( offset > 0 ) {
|
||||
throw new UnsupportedOperationException( "query result offset is not supported" );
|
||||
}
|
||||
if ( limit == 0 ) {
|
||||
return sql;
|
||||
}
|
||||
return new StringBuffer( sql.length() + 40 )
|
||||
.append( sql )
|
||||
.append( " fetch first " )
|
||||
|
|
|
@ -59,6 +59,9 @@ public class DB2400Dialect extends DB2Dialect {
|
|||
if ( offset > 0 ) {
|
||||
throw new UnsupportedOperationException( "query result offset is not supported" );
|
||||
}
|
||||
if ( limit == 0 ) {
|
||||
return sql;
|
||||
}
|
||||
return new StringBuffer( sql.length() + 40 )
|
||||
.append( sql )
|
||||
.append( " fetch first " )
|
||||
|
|
Loading…
Reference in New Issue