diff options
author | Helmut Grohne <helmut@subdivi.de> | 2019-03-24 07:25:38 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2019-03-24 07:25:38 +0100 |
commit | a2eccde5e1e83f77bd015990279f75f8b3c7db4a (patch) | |
tree | 0f693e9527f02aa18a5b723709e4a5557733a490 /build.py | |
parent | 594575d553cec98ff5d9f10d5543a26dd3ee2967 (diff) | |
download | crossqa-a2eccde5e1e83f77bd015990279f75f8b3c7db4a.tar.gz |
table buildreqeusts should have an explicit id
We rely on the id being constant. However, sqlite does not guarantee
that the implicit rowid stays constant across vacuum. Making the rowid
explicit fixes that.
Diffstat (limited to 'build.py')
-rwxr-xr-x | build.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -46,7 +46,7 @@ def main(): db = sqlite3.connect("db", detect_types=sqlite3.PARSE_DECLTYPES) with contextlib.closing(db.cursor()) as cur: cur.execute(""" - SELECT d.source, d.version, d.architecture, r.rowid + SELECT d.source, d.version, d.architecture, r.id FROM depstate AS d JOIN buildrequests AS r ON d.architecture = ifnull(r.architecture, d.architecture) @@ -80,7 +80,7 @@ def main(): (source, version, architecture, success, timestamp, filename)) if requestid is not None: - cur.execute("DELETE FROM buildrequests WHERE rowid = ?;", + cur.execute("DELETE FROM buildrequests WHERE id = ?;", (requestid,)) if giveback: cur.execute("UPDATE depcheck SET giveback = 1 WHERE architecture = ?;", |