Skip to content

Commit

Permalink
HHH-17421 Ensure that no follow-on locking happens on SQL Server and …
Browse files Browse the repository at this point in the history
…Sybase ASE
  • Loading branch information
beikov committed May 7, 2024
1 parent e18bf7b commit 3ce6a13
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,15 @@ private void renderLockHint(LockMode lockMode) {
}
}

@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}

@Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// SQL Server does not support the FOR UPDATE clause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ protected void renderTableGroupJoin(TableGroupJoin tableGroupJoin, List<TableGro
}
}

@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}

@Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase ASE does not really support the FOR UPDATE clause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ private void renderLockHint(LockMode lockMode) {
}
}

@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}

@Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase does not support the FOR UPDATE clause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ private void renderLockHint(LockMode lockMode) {
}
}

@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}

@Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// SQL Server does not support the FOR UPDATE clause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ protected void renderTableGroupJoin(TableGroupJoin tableGroupJoin, List<TableGro
}
}

@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}

@Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase ASE does not really support the FOR UPDATE clause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ private void renderLockHint(LockMode lockMode) {
}
}

@Override
protected LockStrategy determineLockingStrategy(
QuerySpec querySpec,
ForUpdateClause forUpdateClause,
Boolean followOnLocking) {
// No need for follow on locking
return LockStrategy.CLAUSE;
}

@Override
protected void renderForUpdateClause(QuerySpec querySpec, ForUpdateClause forUpdateClause) {
// Sybase does not support the FOR UPDATE clause
Expand Down

0 comments on commit 3ce6a13

Please sign in to comment.