microsoft / microsoft/sqlmanagementobjects

Block comments immediately before a batch separator prevent the separator being detected

Aperta
#196 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
143
Fork
28
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

In SSMS the code

SELECT 1
/* comments! */GO
SELECT 2

Will be sent for execution as two batches:

SELECT 1
/* comments! */

and

SELECT 2

If I try executing it through SMO, it is treated as one batch and is sent unchanged, with the GO in the middle causing an error. It doesn't seem to matter if there is any whitespace between the end of the comment and the GO, nor does the block comment being spread across multiple lines have any effect.

This behaviour is in packages up to 172.64.0 (the latest at time of writing), from at least as far back as 160.2004021.0. I would have gone further back but I couldn't easily find the standalone SMO DLLs.

I tested with net48, net8.0 and net 9.0.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Non sono indicati né un file sorgente né un test. Riproduci il problema con l’SQL mostrato tramite SMO, quindi traccia il punto di ingresso dell’analisi dei separatori di batch e confronta la gestione dei commenti a blocchi con SSMS. Il lavoro è completato quando GO viene riconosciuto come separatore dopo un commento a blocchi, inclusi i commenti multilinea e gli spazi bianchi intermedi, su tutti i target .NET indicati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, sql
Ambito
api, databases
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.