SQLite Forum

question about sqlite3_close_v2 call!

question about sqlite3_close_v2 call!

(1) By anonymous on 2021-09-25 12:55:55 [source]

If i call sqlite3_close_v2 and it return OK then quit process, but there is some statements not finalized. In this case journal file and wal-shm file will be safely handled like I call sqlite3_close and return SQLITE_OK?

I open database in single process only.

(2) By Larry Brasfield (larrybr) on 2021-09-25 14:43:59 in reply to 1 [link] [source]

If either (1) Your single (and therefor auto-transacted) statements completed past the stepping phase (returning SQLITE_DONE), or (2) your multiple statement sets, bounded by transaction begin and end, completed (in the same sense), then the persistent data will be handled safely (where that means adhering to the ACID promise.) This includes effects upon the auxiliary files that SQLite uses to deliver on that promise.

The main penalty for leaving unfinalized statements lying around is memory leaks and reports thereof which responsible programmers generally heed and cure.