microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.51k stars 883 forks source link

Comment blocks not correctly closed results in unhandled fatal error #3071

Open extrobe opened 5 years ago

extrobe commented 5 years ago

Issue: If you open a comment block without closing the previous comment block (and leave one block open) you get a fatal error returned.

Steps to Reproduce:

/* Open a comment Block /* Open another comment block without closing the original one */ Select 1

Execution failed due to an unexpected error: Error: SQL Execution error: A fatal error occurred

In Management Studio (v17.9) this is handled via the error

Msg 113, Level 15, State 1, Line 170 Missing end comment mark '*/'.

baughben commented 5 years ago

I ran into a similar issue. Not sure is this needs a separate issue opened up. This looks to be a formatting problem. When block commented this out only half of is turned green. When I ran the code the block comment worked fine it was just how the IDE presented the code.

/ -- Add a new column '[Visible_OperationsReports]' to table '[Rpt_PropertyList]' in schema '[dbo]' ALTER TABLE [dbo].[Rpt_PropertyList] ADD [Visible_OperationsReports] /new_column_name/ BIT /new_column_datatype/ NOT NULL /new_column_nullability/ CONSTRAINT constraint_Zero DEFAULT 0 WITH VALUES , Visible_PortfolioVariance BIT NOT NULL CONSTRAINT constraint_Zero1 DEFAULT 0 WITH VALUES; /

2019-06-06 09_58_09-● SQLQuery_3 - MCRAWS-SQLTest CorpDB (Integrated) - Reports - Azure Data Studio