generated from DbUp/dbup-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If a script contains comments directly followed by or preceded by a GO statement, the script will not split into commands properly and does not remove the GO. This can be remedied by introducing whitespace around the GO, but as this is valid sql syntax this whitespace should not be necessary.
Code to reproduce:
var sut = new SqlCommandSplitter();
var commands = sut.SplitScriptIntoCommands("/*comment*/GO--comment").ToArray();
var expectedResult = new string[] { "/*comment*/", "--comment"};
Debug.Assert(Enumerable.SequenceEqual(commands, expectedResult));
Expected behavior:
As this is valid sql syntax, the GO should be removed and the resulting commands should be parsed as in expectedResult.
Actual behavior:
Fails, as the SplitScriptIntoCommands function returns the entire string, including the GO, as one command.
malhotrar and napalu
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Bugs