ericsink / SQLitePCL.raw

A Portable Class Library (PCL) for low-level (raw) access to SQLite
Apache License 2.0
512 stars 106 forks source link

e_sqlcipher with SQLITE_DEBUG symbol #538

Open mbenedykconfigit opened 1 year ago

mbenedykconfigit commented 1 year ago

HI, I'm trying to get low level logs from sqlcipher itself to investigate issue with database access over SMB protocol.

From what I read, I need to do custom compilation of sqlcipher with SQLITE_DEBUG symbol defined - analogous to sqlite docs:

I saw https://github.com/ericsink/cb repo for building them, but how to make it work with SQLitePCL.raw package? How I can access debug logs from app - I want to redirect them to console.

A bit more about issue I'm investigating: I have a Linux Container App Service(Azure) with mounted file share(Azure) where I keep my sqlite databases. App is designed to only read from databases, however when multiple instances are starting up simultaneously then they are stuck without any info. From further investigations I was able to track that opening in memory master connection to database(https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/in-memory-databases#shareable-in-memory-databases) blocks other instances. My suspicion is that master connection creates a lock on file and blocks other instances from start until lock will be released.

Do you have any advices on how make it work with sqlite debug logs enabled?