HHH-17421 Ensure that no follow-on locking happens on SQL Server and Sybase ASE

This commit is contained in:
Christian Beikov 2024-05-06 17:25:34 +02:00
parent e18bf7b6b4
commit 3ce6a1351a
6 changed files with 54 additions and 0 deletions

View File

@ -293,6 +293,15 @@ public class SQLServerLegacySqlAstTranslator<T extends JdbcOperation> extends Ab
} }
} }
@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}
@Override @Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) { protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// SQL Server does not support the FOR UPDATE clause // SQL Server does not support the FOR UPDATE clause

View File

@ -271,6 +271,15 @@ public class SybaseASELegacySqlAstTranslator<T extends JdbcOperation> extends Ab
} }
} }
@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}
@Override @Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) { protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase ASE does not really support the FOR UPDATE clause // Sybase ASE does not really support the FOR UPDATE clause

View File

@ -183,6 +183,15 @@ public class SybaseLegacySqlAstTranslator<T extends JdbcOperation> extends Abstr
} }
} }
@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}
@Override @Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) { protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase does not support the FOR UPDATE clause // Sybase does not support the FOR UPDATE clause

View File

@ -271,6 +271,15 @@ public class SQLServerSqlAstTranslator<T extends JdbcOperation> extends SqlAstTr
} }
} }
@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}
@Override @Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) { protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// SQL Server does not support the FOR UPDATE clause // SQL Server does not support the FOR UPDATE clause

View File

@ -256,6 +256,15 @@ public class SybaseASESqlAstTranslator<T extends JdbcOperation> extends Abstract
} }
} }
@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}
@Override @Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) { protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase ASE does not really support the FOR UPDATE clause // Sybase ASE does not really support the FOR UPDATE clause

View File

@ -182,6 +182,15 @@ public class SybaseSqlAstTranslator<T extends JdbcOperation> extends AbstractSql
} }
} }
@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}
@Override @Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) { protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase does not support the FOR UPDATE clause // Sybase does not support the FOR UPDATE clause