Skip to content

Commit

Permalink
Fixed flyway#2298: The procedures 'sp_serveroption' and 'sp_droplinke…
Browse files Browse the repository at this point in the history
…dsrvlogin' cannot be executed within a transaction
  • Loading branch information
Axel Fontaine committed Feb 7, 2019
1 parent c6acf8f commit 2f62271
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -52,8 +52,12 @@ protected Boolean detectCanExecuteInTransaction(String simplifiedStatement, List

String previous = keywords.get(keywords.size() - 2).getText();
// #2175: The procedure 'sp_addsubscription' cannot be executed within a transaction.
// This procedure is only present in SQL Server. Not on Azure nor in PDW.
if ("EXEC".equals(previous) && "SP_ADDSUBSCRIPTION".equals(current)) {
// #2298: The procedures 'sp_serveroption' and 'sp_droplinkedsrvlogin' cannot be executed within a transaction.
// These procedures is only present in SQL Server. Not on Azure nor in PDW.
if ("EXEC".equals(previous) && (
"SP_ADDSUBSCRIPTION".equals(current) ||
"SP_DROPLINKEDSRVLOGIN".equals(current) ||
"SP_SERVEROPTION".equals(current))) {
return false;
}

Expand Down

0 comments on commit 2f62271

Please sign in to comment.