-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
EF7 should work with SQLite version that is included in Windows and older Ubuntu LTS #28776
Comments
@ericsink Any plans to update e_sqlicipher to SQLite 3.35 or newer in the near future? |
@bricelam Assuming the upstream code is more recent (very likely), I should be able to do that. |
🤔 I wonder if we can update EFCore.CrossStore.FunctionalTests to run against e_sqlcipher (and sqlite3 and winsqlite3 too) to catch things like this earlier. |
Looks like SQLitePCLRaw.bundle_winsqlite3 is also broken. The latest insiders build of Windows 11 only includes winsqlite3 version 3.34.1. The version hasn't changed since the May 2021 Update. I'll follow up with them offline to see what their plans are. |
FYI, my github action for building e_sqlite3 and e_sqlcipher is currently broken because it downloads toolchains from musl.cc and that site has blocked microsoft IP addresses: https://github.com/orgs/community/discussions/27906 Workaround pending... |
@roji Let's try and get this into rc2. Ideally, we would detect the SQLite version and automatically do the right thing. If that's not feasible, then we can have an AppContext switch that allows people to opt into the older way of doing things. |
@ajcvickers do you mean provide some means to revert to the older update SQL for SQLite, that doesn't use RETURNING? Should we first see whether @ericsink can work around the build issue, or is there a problem even after that? |
@roji If it was only sqlcipher, then yes. But apparently the SQLite that ships with Windows is too old to wok with |
OK, I see. So is it correct that this is only for people who reference Microsoft.EntityFrameworkCore.Sqlite.Core, as opposed to M.EFC.Sqlite? Are many people doing that, and is it viable to just require people to upgrade their SQLite? Am hoping it wouldn't be too hard to have an alternative code path for this, but it would be better to avoid the complexity if we can etc. |
Yes.
We really have no idea.
Possibly, but again we don't know.
There was a suggestion that we could not do this now and patch if we get enough feedback. But if we're going to take that approach, then I'd like to know that a patch is low-enough risk, so we should investigate now. But then, if it is low risk, then we may want to just do it for rc2--that would be my preference. And if it's not low-risk, well, then I guess it is what it is... |
I see this issue is shifting toward broader concerns, but... FWIW, I've got my sqlcipher updated and the build issue resolved. I should be able to release that in a build soon. |
OK @ajcvickers understood, I'll do the work on this; if it seems like it becomes complex/risky I'll let you know. @bricelam any way to find out at runtime which version of SQLite is being used? If it's easy/possible we can use that to switch the behavior. |
Thanks @smitpatel |
Two ways. If you have access to the DbConnection, use the ServerVersion property. If not, use SQLitePCL.raw.sqlite3_libversion_number() |
Issue #24835 raised the minimum required version of SQLite to 3.35. However, the latest version of SQLitePCLRaw.bundle_e_sqlcipher is based on SQLite 3.34.1.
A simple project like this...
...throws the following exception.
The text was updated successfully, but these errors were encountered: