New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for the TRAN keyword (T-SQL) #4099
add support for the TRAN keyword (T-SQL) #4099
Conversation
Initial review: Change is what I'd expect. Thanks! Things to be aware of:
Things to worry about:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix @AlexGruebel
…Gruebel/liquibase into AlexGruebel-bug/TranKeyWordNotSupported
Rerunning test harness here: https://github.com/liquibase/liquibase-test-harness/actions/runs/4995573646 PASS Note that this execution reran only the SQL Server database tests; all others passed (except for the endemic Titan issues on our HSQL and Firebird DBs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL Server supports the keyword TRANSACTION
and the shorter variant, TRAN
. This PR extends Liquibase to recognize TRAN
and correctly apply delimiters. This prevents SQL execution errors due to improper "chunking" of SQL statements.
- New integration test added with
TRAN
. - Functional and test harness executions passing.
- No additional testing required.
APPROVED
Impact
Description
This PR fixes #4098. It add support for the T-SQL Keyword "TRAN".
Currently liquibase splits sql statements only, if there are not between a "BEGIN" and "END" statement. Since most database start transactions with the "BEGIN TRANSACTION" command, the StringUtil class which is responsible for splitting statements, does ignore the "BEGIN" keyword if it is followed by the keyword "TRANSACTION".
T-SQL (the sql dialect from mssql-server) also supports a shorter version for "TRANSACTION" => "TRAN". The current version of liquibase does not check for keyword "TRAN". This pull request adds support for this keyword.
Things to be aware of
Things to worry about
Additional Context