changeset 2720:453a12ff6f51

core (memory/sqlite): do not call commitStatements if there is nothing to commit in checkUpdates
author Goffi <goffi@goffi.org>
date Mon, 10 Dec 2018 21:06:20 +0100
parents 45189c8bd165
children 4aaa47f62d8d
files sat/memory/sqlite.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/sqlite.py	Mon Dec 10 20:34:45 2018 +0100
+++ b/sat/memory/sqlite.py	Mon Dec 10 21:06:20 2018 +0100
@@ -990,7 +990,7 @@
                         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.