3 ms·
That one is easier as you think: 2.2.1. Multiple copies of SQLite linked into the same application I used two different C# libraries to access the same databas
by andix 5y ago
That one is easier as you think: 2.2.1. Multiple copies of SQLite linked into the same application
I used two different C# libraries to access the same database. And under the hood, they both used a different SQLite library, with different native SQLite builds (of the same version though).
Took me some time to figure out…
- exikyut 5y agoIf they were both the same version, things should technically work, at least on disk. ....ah, but if they were tripping over each other in memory I can see that going sideways. What exactly happened?
- andix 5y agoI don’t know it, but as far as I understand it has to be the exact same shared library, otherwise some in-memory caches don’t get updated on writes. This doesn’t happen, if it’s two separate processes, that are using different libraries. In my case it was just one process. But it’s also possible, that SQLite was built by different compilers/toolchains and that did the trick. What happened: my database files were always corrupted and needed repair. The application did only a few writes, and sometimes the changes just disappeared. Edit: the SQLite website says: „But, if multiple copies of SQLite are linked into the same application, then there will be multiple instances of this global list.“
- mst 5y agoYeah, the problem is inherent to two copies of libsqlite, their being both the same version just makes things marginally less horrific.