-
Notifications
You must be signed in to change notification settings - Fork 627
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
Simply removing JDBC generated key support is NOT a fix #1018
Comments
+1 I fully understand that:
On the other hand, the sqlite-jdbc project supported (if not perfectly) The abrupt removal of this capability has broken integrations with everything from Spring to Hibernate and has clearly caused problems for dozens of applications, plus more that we don't know about. I know first hand that it has caused projects to completely stop including upstream versions of sqlite-jdbc because it will irreparably break applications. It would really be infinitely better to restore the old |
In my searches, I thought I read that Microsoft/Mojang's Java-based Minecraft was also broken by this update. Clearly not something that should have happened in version In fact the comments in Issue #329 say that the functionality should be resolved in "the next major version" See: #329 (comment) It seems to me that somebody jumped the gun because |
You seem to wrongly assume that this project uses SemVer when saying it was released in a minor release. The project does not follow SemVer, as explained here. There won't be a 4.x version, unless there is a sqlite4. As for the change of behaviour, this is simply because there is no way to be compliant with the minimum JDBC requirements for The function |
@gotson - as a compromise, why not have |
it turns out that almost no one checks DatabaseMetaData supportsXXX and everyone has their own assumption on what a driver can/should do 🤷🏻 |
@gotson - that is actually my point exactly! Properly behaving consumers that abide by the JDBC spec and guidance will check DatabaseMetaData, and will be informed that I am confident that a relatively simple change could address the multi threading concerns around I would be happy to do the work on this and submit a pull request, if you would be open to adding back in a threadsafe version of |
Sure, if that helps people we can have a look at a PR |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@prrvchr this issue was already resolved by PR #1035, 2 releases ago. I don't think spam-posting direct links to a jar file in your fork on dozens of closed issues is having the effect you want. It's just causing a lot of noise in this project. Furthermore, it seems like there are some shortcomings and risks in the version you are linking too that could adversely impact the applications that are using this library, since it changes the core behavior that many applications have come to depend on. |
@sjlombardo If you want to comply with JDBC 4.1 (java 7 / 2011) you must support |
@prrvchr #1035 reintroduced I will concede that the current implementation is not JDBC 4.1 compliant because it doesn't handle insertion of multiple rows in the same statement (#468). On that point, however, none of the other aforementioned tickets you commented on today actually need that because they don't do multi-row inserts. They only needed to get single insert keys from getGeneratedKeys, consistent with this drivers historic behavior. #1035 added this feature back in a thread-safe manner. This is clear if you carefully read the details of the issues you posted on and take the history of the project functionality into account. As @gotson has very patiently explained in several other issues, it is difficult to handle multi-inserts due to SQLite limitations. Your approach may work, but it has potentially dangerous side effects in terms of modifying the user specified queries. The change in behavior would also probably break at least some existing applications. The maintainer of this project (and perhaps others) have expressed legitimate concerns about that approach, and explained why they don't want to merge it. I say all this mainly to clarify that you are probably not going to drum up support for a hard fork by spam posting copy-pasted jar links onto issues that are only tangentially related. That said I'm not looking to get pulled into an argument, so I'm not planning to reply back to any further conversation on this thread. |
@prrvchr please stop spamming comments on closed issues. Posting a jar link is mostly useless anyway, since most people use dependency management anyway to pull their deps. You are most welcome to maintain your github fork, and even publish to Maven Central if you want. However, i have already stated the position of this project that we are not interested in merging your changes. Your concerns about JDBC compatibility are well understood, and have been explained. |
Version 3.43.0.0 and later breaks all support for obtaining generated keys because it was not "safe" in some cases.
This is NOT a fix. This is crippling SQLite access via JDBC.
This is supposedly a resolution to Issue #329 , but removing a feature does not resolve the problem.
We still need a reliable way to obtain the generated ID after a single INSERT statement.
There is discussion of using a "RETURNING" clause but even this says its not a complete solution.
The previous functionality worked JUST FINE if you were smart enough to obtain the generated ID after each individual insert and not let any other thread obtain access to your Connection object until you had atomically inserted and obtained the ID.
Just because this did not work with batch inserts or poorly crafted multi-threaded applications did not mean that the functionality should be removed.
Please restore support for obtaining generated keys via JDBC.
ADDITIONALLY: Removing this support in a minor release (i.e.: not 4.x but going from 3.42.x to 3.43.x) breaks backwards compatibility and therefore is not adhering to proper semantic versioning.
The text was updated successfully, but these errors were encountered: