SRombauts / SQLiteCpp

SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
http://srombauts.github.io/SQLiteCpp
MIT License
2.22k stars 510 forks source link

When will the .db-journal file be generated when I don't have any operational database in my project? #470

Open NewJinLn opened 3 months ago

NewJinLn commented 3 months ago

Hello, I use SQlite in my project. When the project is running and I make sure that no service does anything to the database, the .db-journal file appears in the folder, but disappears after a while. I don't know why the .db-journal file appears when there is no service to perform database operations, causing my other operations to fail, such as copying folders. Can you tell me under what conditions the .db-journal file appears in sqlite itself? For example, whether there are self-acts such as reclaiming space. I'm looking forward to your answer to my doubt. Thank you.

NewJinLn commented 3 months ago

I looked in the manual and found a note in https://www.sqlite.org/tempfiles.html that said, "The rollback journal is usually created and destroyed at the start and end of a transaction, respectively. There are exceptions to this rule." What is the exception to this rule?