core (memory/sqlite): do not call commitStatements if there is nothing to commit in checkUpdates

This commit is contained in:
Goffi 2018-12-10 21:06:20 +01:00
commit 51bc3411ba

View file

@ -990,7 +990,7 @@ class Updater(object):
update_data = DATABASE_SCHEMAS[version]
except KeyError:
raise exceptions.InternalError("Missing update definition (version %d)" % version)
if "specific" in update_data:
if "specific" in update_data and update_raw:
# if we have a specific, we must commit current statements
# because a specific may modify database itself, and the database
# must be in the expected state of the previous version.