mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Remove invalid SET option for SqlOnDemand (#1147)
This commit is contained in:
@@ -36,7 +36,6 @@ namespace Microsoft.Kusto.ServiceLayer.QueryExecution
|
|||||||
private static readonly string s_SetCursorCloseOnCommit = "SET CURSOR_CLOSE_ON_COMMIT {0}";
|
private static readonly string s_SetCursorCloseOnCommit = "SET CURSOR_CLOSE_ON_COMMIT {0}";
|
||||||
private static readonly string s_SetImplicitTransaction = "SET IMPLICIT_TRANSACTIONS {0}";
|
private static readonly string s_SetImplicitTransaction = "SET IMPLICIT_TRANSACTIONS {0}";
|
||||||
private static readonly string s_SetQuotedIdentifier = "SET QUOTED_IDENTIFIER {0}";
|
private static readonly string s_SetQuotedIdentifier = "SET QUOTED_IDENTIFIER {0}";
|
||||||
private static readonly string s_SetNoExec = "SET NOEXEC {0}";
|
|
||||||
private static readonly string s_SetStatisticsTime = "SET STATISTICS TIME {0}";
|
private static readonly string s_SetStatisticsTime = "SET STATISTICS TIME {0}";
|
||||||
private static readonly string s_SetStatisticsIO = "SET STATISTICS IO {0}";
|
private static readonly string s_SetStatisticsIO = "SET STATISTICS IO {0}";
|
||||||
private static readonly string s_SetParseOnly = "SET PARSEONLY {0}";
|
private static readonly string s_SetParseOnly = "SET PARSEONLY {0}";
|
||||||
@@ -194,14 +193,6 @@ namespace Microsoft.Kusto.ServiceLayer.QueryExecution
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SetNoExecString
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return string.Format(System.Globalization.CultureInfo.InvariantCulture, s_SetNoExec, (this.settings.NoExec ? s_On : s_Off));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetSetStatisticsTimeString(bool? on)
|
public string GetSetStatisticsTimeString(bool? on)
|
||||||
{
|
{
|
||||||
on = on ?? this.settings.StatisticsTime;
|
on = on ?? this.settings.StatisticsTime;
|
||||||
|
|||||||
@@ -623,7 +623,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
// "set noexec off" should be the very first command, cause everything after
|
// "set noexec off" should be the very first command, cause everything after
|
||||||
// corresponding "set noexec on" is not executed until "set noexec off"
|
// corresponding "set noexec on" is not executed until "set noexec off"
|
||||||
// is encounted
|
// is encounted
|
||||||
if (!settings.NoExec)
|
// NOEXEC is not currently supported by SqlOnDemand servers
|
||||||
|
if (!settings.NoExec && connection.EngineEdition != SqlServer.Management.Common.DatabaseEngineEdition.SqlOnDemand)
|
||||||
{
|
{
|
||||||
builderBefore.AppendFormat("{0} ", helper.SetNoExecString);
|
builderBefore.AppendFormat("{0} ", helper.SetNoExecString);
|
||||||
}
|
}
|
||||||
@@ -684,7 +685,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
|
|
||||||
// "set noexec on" should be the very last command, cause everything after it is not
|
// "set noexec on" should be the very last command, cause everything after it is not
|
||||||
// being executed unitl "set noexec off" is encounered
|
// being executed unitl "set noexec off" is encounered
|
||||||
if (settings.NoExec)
|
// NOEXEC is not currently supported by SqlOnDemand servers
|
||||||
|
if (settings.NoExec && connection.EngineEdition != SqlServer.Management.Common.DatabaseEngineEdition.SqlOnDemand)
|
||||||
{
|
{
|
||||||
builderBefore.AppendFormat("{0} ", helper.SetNoExecString);
|
builderBefore.AppendFormat("{0} ", helper.SetNoExecString);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user