Skip to content

Commit e0d262c

Browse files
AxinetSanne
authored andcommitted
HHH-14813 Update DB2 dialect with bind parameters limit
Provide allowed parameters limit for DB2 queries based on official documentation: https://www.ibm.com/docs/en/db2/11.5?topic=sql-xml-limits
1 parent a666ac0 commit e0d262c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
*/
5252
public class DB2Dialect extends Dialect {
5353

54+
private static final int BIND_PARAMETERS_NUMBER_LIMIT = 32_767;
55+
5456
private static final AbstractLimitHandler LIMIT_HANDLER = new AbstractLimitHandler() {
5557
@Override
5658
public String processSql(String sql, RowSelection selection) {
@@ -596,4 +598,9 @@ public IdentityColumnSupport getIdentityColumnSupport() {
596598
public boolean supportsPartitionBy() {
597599
return true;
598600
}
601+
602+
@Override
603+
public int getInExpressionCountLimit() {
604+
return BIND_PARAMETERS_NUMBER_LIMIT;
605+
}
599606
}

0 commit comments

Comments
 (0)