Skip to content

Commit

Permalink
Merge pull request #388 from Particular/hotfix-3.1.2
Browse files Browse the repository at this point in the history
Quote catalog name in DDL statements
  • Loading branch information
MarcinHoppe authored Aug 2, 2017
2 parents c2ca654 + 6418e08 commit 3da710c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public CanonicalQueueAddress(string table, string schemaName, string catalogName
public string Address { get; }

public string QualifiedTableName { get; }
public string QuotedCatalogName => Quote(Catalog);

string GetCanonicalForm()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task CreateQueueIfNecessary(QueueBindings queueBindings, string ide
static async Task CreateDelayedMessageQueue(CanonicalQueueAddress canonicalQueueAddress, SqlConnection connection, SqlTransaction transaction)
{
#pragma warning disable 618
var sql = string.Format(SqlConstants.CreateDelayedMessageStoreText, canonicalQueueAddress.QualifiedTableName, canonicalQueueAddress.Catalog);
var sql = string.Format(SqlConstants.CreateDelayedMessageStoreText, canonicalQueueAddress.QualifiedTableName, canonicalQueueAddress.QuotedCatalogName);
#pragma warning restore 618
using (var command = new SqlCommand(sql, connection, transaction)
{
Expand Down
2 changes: 1 addition & 1 deletion src/NServiceBus.SqlServer/Receiving/QueueCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task CreateQueueIfNecessary(QueueBindings queueBindings, string ide

static async Task CreateQueue(CanonicalQueueAddress canonicalQueueAddress, SqlConnection connection, SqlTransaction transaction)
{
var sql = string.Format(SqlConstants.CreateQueueText, canonicalQueueAddress.QualifiedTableName, canonicalQueueAddress.Catalog);
var sql = string.Format(SqlConstants.CreateQueueText, canonicalQueueAddress.QualifiedTableName, canonicalQueueAddress.QuotedCatalogName);
using (var command = new SqlCommand(sql, connection, transaction)
{
CommandType = CommandType.Text
Expand Down

0 comments on commit 3da710c

Please sign in to comment.