Turn "vacuum analyze" into two commands (fix for sqlite 3.15)

Before sqlite 3.15, the parameter to vacuum was ignored. Since sqlite
3.15, it became a database name parameter. The "vacuum analyze" syntax
was never supported by sqlite, seems to be just a psql thing.

The error for this is "OperationalError: unknown database analyze", and
happens when doing a media sync.
This commit is contained in:
dequis 2017-01-15 13:25:21 -03:00
parent b5a8973791
commit 9c902aec18

View File

@ -446,7 +446,8 @@ create table meta (dirMod int, lastUsn int); insert into meta values (0, 0);
self.db.execute("update meta set lastUsn=0,dirMod=0")
self.db.commit()
self.db.setAutocommit(True)
self.db.execute("vacuum analyze")
self.db.execute("vacuum")
self.db.execute("analyze")
self.db.setAutocommit(False)
# Media syncing: zips