Skip to content

Commit

Permalink
Fixed #2175: 'sp_addsubscription' cannot be executed within a transac…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Axel Fontaine committed Oct 23, 2018
1 parent 2a5a01e commit 49a1d3f
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -40,7 +40,11 @@ public class SQLServerSqlStatementBuilder extends SqlStatementBuilder {
* Regex for statements that cannot be executed within a transaction.
*/
private static final Pattern NON_TRANSACTIONAL_STATEMENT_REGEX =
Pattern.compile("^(BACKUP|RESTORE|RECONFIGURE|(CREATE|DROP|ALTER) (DATABASE|FULLTEXT INDEX)) .*");
Pattern.compile("^((BACKUP|RESTORE|RECONFIGURE|(CREATE|DROP|ALTER) (DATABASE|FULLTEXT INDEX))|" +
// #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.
"(EXEC SP_ADDSUBSCRIPTION)" +
")( .*)?");

/**
* Holds the beginning of the statement.
Expand Down

0 comments on commit 49a1d3f

Please sign in to comment.