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

オープン
#196 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp, sql
領域
api, databases

調査の方向性

ソースファイルもテストも指定されていません。SMO を通じて示されている SQL で問題を再現し、次にバッチ区切り文字の解析のエントリーポイントを追跡して、ブロックコメントの処理を SSMS と比較してください。ブロックコメントの後で GO が区切り文字として認識され、複数行コメントとその間にある空白も含めて、報告されているすべての .NET ターゲットで動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C#
スター
143
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/sqlmanagementobjects のほかの issue

microsoft/sqlmanagementobjects の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。