Skip to content
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

BatchInsert is translated incorrectly for Oracle custom changes #1613

Open
cdprete opened this issue Jan 4, 2021 · 9 comments
Open

BatchInsert is translated incorrectly for Oracle custom changes #1613

cdprete opened this issue Jan 4, 2021 · 9 comments

Comments

@cdprete
Copy link

cdprete commented Jan 4, 2021

Liquibase Integration: Spring Boot 2.1.2

Database Vendor & Version: Oracle 12

Description

When creating a custom change that implies the usage of InsertSetStatement for performing multiple insertions at once, the InsertSetGenerator#supports method returns true for Oracle, but the statement that's generated is invalid.
INSERT INTO XYZ(X,Y,Z) VALUES(...),...,(...) is generated rather than something like in https://stackoverflow.com/a/39602

@molivasdat
Copy link
Contributor

Hi @cdprete Thanks for writing up this issue.
If I could get a little more information in the description of what you are trying to do that would be great.
Can you describe how to recreate the problem you are seeing and what you expect the outcome to be?
Another assumption is that you are using Spring Boot 2.1.2 with the version of liquibase it comes with 3.6?
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot/2.1.2.RELEASE
Or did you update Liquibase?

@cdprete
Copy link
Author

cdprete commented Jan 7, 2021

Hi @molivasdat
Yes, I'm using the version provided by Spring Boot.

What I'm doing is essentially to implement a https://www.javadoc.io/static/org.liquibase/liquibase-core/3.6.0/liquibase/change/custom/CustomSqlChange.html that returns an array of https://www.javadoc.io/static/org.liquibase/liquibase-core/3.6.0/liquibase/statement/core/InsertSetStatement.html where, of course, every InsertSetStatement has multiple https://www.javadoc.io/static/org.liquibase/liquibase-core/3.6.0/liquibase/statement/core/InsertStatement.html.

This works fine for Postgres, but with Oracle the DML above is generated as well which is unsupported.

@molivasdat
Copy link
Contributor

Thanks @cdprete for the additional description. We will add this to the list of issues to process. We typically do not go back in versions for updates at least on the community version. Would it be a problem to update the latest version to get something fixed?

@cdprete
Copy link
Author

cdprete commented Jan 13, 2021

Hi @molivasdat.
It depends on the changes which are introduced.
If there are breaking changes not compatible with such said Spring Boot version, then update won't be an option unfortunately.

@cdprete
Copy link
Author

cdprete commented Feb 3, 2021

Hi @molivasdat.
Is there any news on this?

@molivasdat
Copy link
Contributor

Hi @cdprete I don't have a PR or fix yet for this. If you have suggested fix that might help move it along faster.

@kevin-atx kevin-atx changed the title BatchInsert is translated wrongly for Oracle custom changes BatchInsert is translated incorrrectly for Oracle custom changes Apr 20, 2023
@kevin-atx kevin-atx changed the title BatchInsert is translated incorrrectly for Oracle custom changes BatchInsert is translated incorrectly for Oracle custom changes Apr 20, 2023
@tati-qalified
Copy link
Contributor

Hello @cdprete, sorry for the late response, we're going through our ticket backlog and testing these issues.
I've been trying to replicate this issue, but I don't think I have enough information to do so. Would you be able to provide some sample code that shows how you're using these objects?
Thank you,
Tatiana

@cdprete
Copy link
Author

cdprete commented Dec 14, 2023

Hi @tati-qalified.

Not anymore since almost 2y have passed :D

@tati-qalified
Copy link
Contributor

That's fair, thank you anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Open Issues
Development

No branches or pull requests

5 participants