PulkoMandy from the Haiku port found that turnOnIncrementalAutoVacuum is broken again on trunk due to 258673@main. (It was previously fixed in 241334@main.) The issue is that we need to call lastError() before finalizing the auto_vacuum statement rather than before. Otherwise lastError() returns the return code from the sqlite3_finalize that destroyed the statement rather than the sqlite3_step that enabled auto-vacuum.
*** This bug has been marked as a duplicate of bug 259284 ***