Skip to content

Commit

Permalink
0003576: Sync triggers fails with deadlock on SQL-Server
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Jan 31, 2023
1 parent a1b5fbb commit 499b19e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -406,8 +406,8 @@ protected void postCreateTrigger(ISqlTransaction transaction, StringBuilder sqlB
}
String triggerNameFirst = (String) transaction.queryForObject(
"select tr.name " +
"from sys.triggers tr inner join sys.trigger_events te on te.object_id = tr.object_id " +
"inner join sys.tables t on t.object_id = tr.parent_id " +
"from sys.triggers tr with (nolock) inner join sys.trigger_events te with (nolock) on te.object_id = tr.object_id " +
"inner join sys.tables t with (nolock) on t.object_id = tr.parent_id " +
"where t.name = ? and te.type_desc = ? and te.is_first = 1", String.class, table.getName(), dml.name());
if (StringUtils.isNotBlank(triggerNameFirst)) {
log.warn("Existing first trigger '{}{}' is being set to order of 'None'", schemaName, triggerNameFirst);
Expand Down

0 comments on commit 499b19e

Please sign in to comment.