mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-06 19:36:03 +00:00
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 String getLimitString(String sql, int offset, int limit) {
|
||||
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 String getLimitString(String sql, int offset, int limit) {
|
||||
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…
x
Reference in New Issue
Block a user