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