]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
Database locking: Tcl: Use db-execute-array for SELECT in sg-execute-flight
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 14 Jul 2016 12:11:44 +0000 (13:11 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 14 Jul 2016 12:19:32 +0000 (13:19 +0100)
We are going to make it wrong to use db-execute for SELECT statements.

Convert the existing violation site, which uses db-execute, into
db-execute-array (providing a dummy arrayvar).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Dropped change to become-task which is actually wrong and should
    be db-update-1, anyway.  This will now be fixed in a separate patch.

sg-execute-flight

index 27fc04cbd26aed1d99ab6b272215797b1130b3e7..14c8cda5083ec8bb0454e38ac526d482f272a850 100755 (executable)
@@ -30,7 +30,7 @@ proc check {} {
 
     jobdb::db-open
 
-    set nqueued [jobdb::db-execute "
+    set nqueued [jobdb::db-execute-array dummy "
         SELECT job FROM jobs j
          WHERE j.flight = $flight
            AND j.status = 'queued'