microsoft / microsoft/sqlmanagementobjects
Block comments immediately before a batch separator prevent the separator being detected
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 143
- Forks
- 28
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Keine Quelldatei und kein Test sind angegeben. Reproduziere das Problem mit dem über SMO angezeigten SQL, verfolge dann den Einstiegspunkt für das Parsen von Batch-Trennzeichen und vergleiche die Behandlung von Blockkommentaren mit SSMS. Erledigt ist die Aufgabe, wenn GO nach einem Blockkommentar als Trennzeichen erkannt wird, einschließlich mehrzeiliger Kommentare und dazwischenliegendem Leerraum, über alle gemeldeten .NET-Ziele hinweg.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, sql
- Bereich
- api, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100