mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-28 01:25:44 -05:00
Fix tools service crash + improve server edition naming (#506)
* Fix https://github.com/Microsoft/vscode-mssql/issues/986 and add better server edition naming - Fixed a number of issues related to the binding queue, specifically the fact that it didn't capture exceptions that occurred on the binding thread. This caused the thread to crash the service. - The root cause of the error was when you get a connection error during init of the SmoMetadataProvider which threw an exception. Because of this no Binder was created, and the code would null ref later during processing - Added logic to handle null ref issue and other related code - Added a unit test for the new error handling path, and supported still returning some value in this case - Separately, have a fix for an issue where the edition is shown as "SQL Azure" for all Azure connections. Fixing to be "Azure SQL DB" for this case and handle when the database reports as DW or Stretch instead. This maps better to users concept of what the edition should be and avoids returning what is an outdated term. * Messed up the test - fixing this by returning the expected return object
This commit is contained in:
@@ -77,6 +77,30 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
}
|
||||
}
|
||||
|
||||
public static string AzureSqlDbEdition
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.AzureSqlDbEdition);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AzureSqlDwEdition
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.AzureSqlDwEdition);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AzureSqlStretchEdition
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.AzureSqlStretchEdition);
|
||||
}
|
||||
}
|
||||
|
||||
public static string QueryServiceCancelAlreadyCompleted
|
||||
{
|
||||
get
|
||||
@@ -3652,6 +3676,15 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
public const string ConnectionParamsValidateNullSqlAuth = "ConnectionParamsValidateNullSqlAuth";
|
||||
|
||||
|
||||
public const string AzureSqlDbEdition = "AzureSqlDbEdition";
|
||||
|
||||
|
||||
public const string AzureSqlDwEdition = "AzureSqlDwEdition";
|
||||
|
||||
|
||||
public const string AzureSqlStretchEdition = "AzureSqlStretchEdition";
|
||||
|
||||
|
||||
public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted";
|
||||
|
||||
|
||||
|
||||
@@ -166,6 +166,18 @@
|
||||
<comment>.
|
||||
Parameters: 0 - component (string) </comment>
|
||||
</data>
|
||||
<data name="AzureSqlDbEdition" xml:space="preserve">
|
||||
<value>Azure SQL DB</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="AzureSqlDwEdition" xml:space="preserve">
|
||||
<value>Azure SQL Data Warehouse</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="AzureSqlStretchEdition" xml:space="preserve">
|
||||
<value>Azure SQL Stretch Database</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="QueryServiceCancelAlreadyCompleted" xml:space="preserve">
|
||||
<value>The query has already completed, it cannot be cancelled</value>
|
||||
<comment></comment>
|
||||
|
||||
@@ -47,6 +47,11 @@ ConnectionParamsValidateNullServerName = ServerName cannot be null or empty
|
||||
|
||||
ConnectionParamsValidateNullSqlAuth(string component) = {0} cannot be null or empty when using SqlLogin authentication
|
||||
|
||||
### General connection service strings
|
||||
AzureSqlDbEdition = Azure SQL DB
|
||||
AzureSqlDwEdition = Azure SQL Data Warehouse
|
||||
AzureSqlStretchEdition = Azure SQL Stretch Database
|
||||
|
||||
############################################################################
|
||||
# Query Execution Service
|
||||
|
||||
|
||||
@@ -2280,6 +2280,21 @@
|
||||
<target state="new">Never</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="AzureSqlDbEdition">
|
||||
<source>Azure SQL DB</source>
|
||||
<target state="new">Azure SQL DB</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="AzureSqlDwEdition">
|
||||
<source>Azure SQL Data Warehouse</source>
|
||||
<target state="new">Azure SQL Data Warehouse</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="AzureSqlStretchEdition">
|
||||
<source>Azure SQL Stretch Database</source>
|
||||
<target state="new">Azure SQL Stretch Database</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
Reference in New Issue
Block a user