dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.36k stars 191 forks source link

Fixed bug which caused some queries with semicolons to crash #425

Closed ellbosch closed 4 years ago

ellbosch commented 4 years ago

Fixes #422

The mssql-cli client uses old and unnecessary logic to right-strip semicolons. This was introduced in a refactor a few years ago, making it unclear why it was added in the first place. All of our tests passed after removing the semicolon-strip logic, however we needed to make minor updates to a few tests to expect semicolons in the input text.

This PR also introduces new tests to ensure the script in the #422 bug report work in multiline and non-interactive modes.