Quantcast

PRAGMA optimize after VACUUM results in Error: database schema has changed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PRAGMA optimize after VACUUM results in Error: database schema has changed

Matthäus G. Chajdas
Hi,

using SQLite 3.18.0, x86 (and x64), on Windows 10 x64 (using the
precompiled tools from https://www.sqlite.org/download.html -- issue
appears when building from source as well):

E:\DL\sqlite-tools-win32-x86-3180000> .\sqlite3.exe
SQLite version 3.18.0 2017-03-28 18:48:43
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> VACUUM;
sqlite> PRAGMA optimize;
Error: database schema has changed

Notice that VACUUM; ANALYZE; works, as well as PRAGMA optimize; VACUUM;

Given that PRAGMA optimize only calls ANALYZE as of 3.18 on tables that
might benefit, I'd expect it to behave the same as an ANALYZE call --
i.e. either both should return an error, or both should pass.

Is this a bug, or is this intended behavior?

Cheers,
   Matthäus
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PRAGMA optimize after VACUUM results in Error: database schema has changed

Richard Hipp-3
On 5/5/17, Matthäus G. Chajdas <[hidden email]> wrote:
> sqlite> VACUUM;
> sqlite> PRAGMA optimize;
> Error: database schema has changed

Thanks for the bug report.

Thank problem was fixed about a month ago with check-in
https://www.sqlite.org/src/timeline?c=86897c24c0b35ffea8df which has
not yet appeared in an official release.  You can use the "prerelease
snapshot" on the website until version 3.19.0 appears.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...