aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-06 10:57:44 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-06 11:02:24 +0000
commit2f6283515360e3707aaeab66f4082d1c55da72cc (patch)
tree713d594951df712a9a75d64e969cbf0ed5db8f63
parent38f48c80da14f651d07a9e7c060dc5d4159453f8 (diff)
downloadcuirass-2f6283515360e3707aaeab66f4082d1c55da72cc.tar
cuirass-2f6283515360e3707aaeab66f4082d1c55da72cc.tar.gz
Don't finalise cached statements
All these statements are cached, but that's pointless if they're finalized after use, because they'll need recreating on next use.
-rw-r--r--src/cuirass/database.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 7bbf467..63c3525 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -117,7 +117,7 @@ rows."
(sqlite-bind stmt index (normalize arg)))
args (iota (length args) 1))
(let ((result (sqlite-fold-right cons '() stmt)))
- (sqlite-finalize stmt)
+ (sqlite-reset stmt)
result)))
(define-syntax sqlite-exec/bind
@@ -1292,7 +1292,7 @@ AND (:system IS NULL
(query->bind-arguments query))
(sqlite-reset stmt)
(let ((rows (sqlite-fold-right cons '() stmt)))
- (sqlite-finalize stmt)
+ (sqlite-reset stmt)
(and=> (expect-one-row rows) vector->list)))))
(define (db-get-builds-query-max query)
@@ -1313,7 +1313,7 @@ AND (:system IS NULL
(query->bind-arguments query))
(sqlite-reset stmt)
(let ((rows (sqlite-fold-right cons '() stmt)))
- (sqlite-finalize stmt)
+ (sqlite-reset stmt)
(and=> (expect-one-row rows) vector->list)))))
(define (db-get-builds-min eval status)