SQLite Forum

Possible freeze in the progress loop
I also tried to make some simple test with a small memory/time footprint using CTE and noticed that due to the logic behind the progress callback, the unexpected outcome could also be a partial freeze of the progress callback while Sqlite still continues the execution and finishes it.

This is probably because not every nVmStep increase goes to progress handler, but probably only "Goto" vdbe instruction. So nProgressLimit may have some almost fully saturated value (0xFFFFFFFA) and nVmStep leaves the progress loop (for example with 0xFFFFFFF9 value) and wraps after that to zero (while not visiting the progress loop), so after that this progress loop is ignored until nVmStep reaches again an big value.

So some other users previously could have not a responsive-freeze symptom like mine, but one when sqlite becomes fully unresponsive starting some point during the execution, but finally finishing without an issue.