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
SQLite regression bug after Liquibase 4.8.0 release. Generated sql syntax errors for addAutoIncrement, addDefaultValue, dropColumn, mergeColumns #2644
Comments
@AlexanderSashchenko thanks for all the detail here; we will definitely take a look |
Any news on this issue ? |
Better standardization of data checks on h2 Better standardization of data checks on h2 Updated setPrimaryKeyColumnRemarks.sql to match updated SQL [DAT-9954] Created tests for EDB with EDB driver (#209) * [DAT-9954] Created tests for EDB with EDB driver * [DAT-9954] Config file fix * [DAT-9954] Made requested fixes * [DAT-9954]Made distinguishing EDB with PostgreSQL and EDB drivers more clear * [DAT-9954]Made changes for github actions to run tests against both EDB with Postgres and EDB drivers * [DAT-9954]Fixed automation-runner * [DAT-9954]Fixed create-infra.sh and teardown-infra.sh * [DAT-9954]Fixed create-infra.sh and teardown-infra.sh * [DAT-9954]Fixed changeData tests * fixed setPrimaryKeyColumnRemarks Co-authored-by: KushnirykOleh <kushnirykoleh@gmail.com> Added platform to mysql docker instances for compatability with Mac M1 machines Revert "Added platform to mysql docker instances for compatability with Mac M1 machines" This reverts commit 1414399. Add platforms to ensure compatability with Mac M1 machines paginate through results of workflow runs on client side only paginate through a maximum of 10 pages add missing values to returnData in workflow-helper.js (#215) Updated jdbc driver versions to match new liquibase versions Updated jaybird driver to 4.0.6 Updated build logic to rely on liquibase-sdk-maven-plugin (#225) * Updated build logic to use liquibase-sdk-maven-plugin more heavily Fall back to master build if branch is being computed Corectly configure 0-SNAPSHOT liquibase in tests Run 0-SNAPSHOT liquibase in tests in Giving cockroachdb a bit more time to start Log cockroach startup Fixing build logic removed comments from ignored tests unignored sqlite for develop branch reverted changes in CICD files
I was not able to reproduce this issue on below environment:
I tried using examples (changelogs) provided here and all of them have been executed successfully. Closing this issue by now. @AlexanderSashchenko could you please try again on a recent version and please let me know if you are still able to reproduce it? Thanks, |
My apologies @Jerbell I did not mean to tag you on this one. Please ignore my comment. |
For future reference, it looks like this bug might have been introduced by pull request #2398, and was fixed for 4.11.0 by pull request #2778. I was investigating this some time ago, and if I remember it correctly, Liquibase is looking up the tables at some point during changelog execution, but due to the broken table name escaping it wasn't finding the tables and then in subsequent steps used an empty string as table name. But I might be misremembering this. |
Environment
Liquibase Version: 4.8.0
Liquibase Integration & Version: CLI, test-harness(Command Framework)
Liquibase Extension(s) & Version: na
Database Vendor & Version: sqlite 3.34.0
Operating System Type & Version: windows 10
Description
After the release of Liquibase 4.8.0 a bug was found. This bug doesn't get reproduced on previous versions. The bug is reproduced in case you try to use Liquibase 'update' command against SQLite database (version 3.34.0 in my case) for the change types:
_- addAutoIncrement;
The bug is about generating wrong SQL queries for named above change types. For addAutoIncrement, addDefaultValue and dropColumn Liquibase generates "CREATE TABLE table_name ()" query. For mergeColumns it generates "UPDATE full_name_table SET full_name = first_name || ' ' || last_name". Examples of used changelogs and full exception logs are attached.
Steps To Reproduce
Run Liquibase 'update' command on version 4.8.0 against SQLite database for named above change types.
Actual Behavior
SQL exceptions described in description section get thrown. Detailed logs are attached (.xml files are saved as .txt files).
Expected/Desired Behavior
Successful deployment of named change types
dropColumn full exception log.txt
dropColumn.txt
addDefaultValue full exception log.txt
addDefaultValue.txt
mergeColumns full exception log.txt
mergeColumns.txt
addAutoIncrement full exception log.txt
addAutoIncrement.txt
The text was updated successfully, but these errors were encountered: