Skip to content

Conversation

shueybubbles
Copy link
Collaborator

  • If the first line of a batch was blank and the second line had a variable reference in it, we were calculating the offset to the variable incorrectly.
  • Identifiers surrounded by [] were not being properly read
  • exit command had a buggy regex which matched variants like exit_something

Fixes #197
Fixes #198

Copy link

@nycdotnet nycdotnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to fix other labels that start with commands such as Rollback_Record: ?

@shueybubbles
Copy link
Collaborator Author

rollback isn't a sqlcmd command so I didn't think it was affected.

@nycdotnet
Copy link

@shueybubbles SQLCMD was throwing errors for me on labels like Rollback_Record: and renaming them to something like zRollback_Record: fixed it. Perhaps this is separate - let me try.

@nycdotnet
Copy link

OK seems to work for me on this version. 👍

Copy link

@nycdotnet nycdotnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a project approver but these changes appear to fix our issues with v0.11

@stuartpa
Copy link
Collaborator

Looks good to me (100% code coverage for fix)

@stuartpa stuartpa closed this Jan 26, 2023
@stuartpa stuartpa reopened this Jan 26, 2023
Copy link
Collaborator

@stuartpa stuartpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@shueybubbles shueybubbles merged commit b9675a4 into main Jan 26, 2023
@shueybubbles shueybubbles deleted the shueybubbles/197 branch January 26, 2023 15:08
@nycdotnet
Copy link

Thank you for doing this. I know you're dealing with some license generation stuff now and the build is failing, but when you get that squared away, doing a release would be very much appreciated. Thanks for all of your hard work on robustifying go-sqlcmd to work with our legal but gross T-SQL :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing error with database name
3 participants