mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 09:59:48 -05:00
Fixed issue where no-op queries would never complete (#157)
* Fixed issue where no-op queries would never complete * Changed approach to solving the race condition with no-op queries * Addressing feedback
This commit is contained in:
@@ -424,6 +424,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
OwnerUri = executeParams.OwnerUri,
|
||||
BatchSummaries = q.BatchSummaries
|
||||
};
|
||||
|
||||
await requestContext.SendEvent(QueryExecuteCompleteEvent.Type, eventParams);
|
||||
};
|
||||
|
||||
@@ -470,9 +471,15 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
query.Execute();
|
||||
|
||||
// Send back a result showing we were successful
|
||||
string messages = null;
|
||||
if (query.Batches.Length == 0)
|
||||
{
|
||||
// If there were no batches to execute, send back an informational message that the commands were completed successfully
|
||||
messages = SR.QueryServiceCompletedSuccessfully;
|
||||
}
|
||||
await requestContext.SendResult(new QueryExecuteResult
|
||||
{
|
||||
Messages = null
|
||||
Messages = messages
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user