]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
sg-report-flight: prefer to reference flights with lexically early blessings (prefer...
authorIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 12 Feb 2013 15:22:10 +0000 (15:22 +0000)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 12 Feb 2013 15:22:10 +0000 (15:22 +0000)
sg-report-flight

index dc5af441b572d0825df47e7e6b796b018076d3ad..cdf307626b7bd3ad6824c233031ca342c125e87c 100755 (executable)
@@ -143,11 +143,14 @@ END
     }
 
     my $flightsq= <<END;
-        SELECT flight FROM flights
+      SELECT * FROM (
+        SELECT flight, blessing FROM flights
             WHERE branch=?
               AND $blessingscond
             ORDER BY flight DESC
             LIMIT 1000
+      ) AS sub
+      ORDER BY blessing ASC, flight DESC
 END
     #print DEBUG "===\n$flightsq\n===\n";
     $flightsq= $dbh_tests->prepare($flightsq);