sub changes () {
debug("CHANGES...\n");
- my $steps_q = $dbh_tests->prepare("SELECT * FROM steps WHERE flight = ?");
- $steps_q->execute($dstflight);
- my $step = $steps_q->fetchrow_hashref();
- die "$dstflight already has steps\n".Dumper($step) if $step;
+ if ($dstflight =~ m/^\d+$/) {
+ my $steps_q =
+ $dbh_tests->prepare("SELECT * FROM steps WHERE flight = ?");
+ $steps_q->execute($dstflight);
+ my $step = $steps_q->fetchrow_hashref();
+ die "$dstflight already has steps\n".Dumper($step) if $step;
+ }
while (@changes) {
my $change = shift @changes;
}
sub main () {
- if ($dstflightspec =~ m/^\d+$/) {
+ if ($dstflightspec =~ m/^\w+$/) {
$dstflight = $dstflightspec;
db_retry($dstflight,'constructing',
$dbh_tests, [qw(flights)], sub {
}
}
-die unless @ARGV==1 && $ARGV[0] =~ m/^\d+/;
+die unless @ARGV==1 && $ARGV[0] =~ m/^\w+$/;
our ($flight) = @ARGV;
our @cols = qw(job name val);
+$flight =~ m/^\d+/ or $flight = "'$flight'";
my $qfrom = "FROM runvars WHERE flight=$flight AND $synthcond";
my @colws = $dbh_tests->selectrow_array