Commit 9d39d1b8 authored by Leigh Stoller's avatar Leigh Stoller

Another mysql 5.7 change.

parent 694cf76c
......@@ -2294,7 +2294,7 @@ sub SwapFail($$$$;$)
# This is pointless.
DBQueryWarn("update experiment_stats set ".
" swap_errors=swap_errors+1, ".
" swap_exitcode=$ecode, ".
" swap_exitcode='$ecode', ".
" last_error=$session ".
"where exptidx=$exptidx");
}
......@@ -2604,6 +2604,9 @@ sub GatherSwapStats($$$;$$)
if (!defined($flags));
$ecode = 0
if (!defined($ecode));
# Perl/mysql sillyness.
$ecode = -1
if ($ecode == 255);
#
# If this is a start time marker, then just record the time in a global
......@@ -2638,7 +2641,7 @@ sub GatherSwapStats($$$;$$)
"(idx, uid, uid_idx, start_time, end_time, exptidx, rsrcidx, ".
" action, exitcode, log_session) ".
"values (0, '$uid', '$uid_idx', $starttime, now(), ".
" $exptidx, $rsrcidx, '$mode', $ecode, $session)")
" $exptidx, $rsrcidx, '$mode', '$ecode', $session)")
or return -1;
return 0;
......
......@@ -339,6 +339,11 @@ sub Exited($$)
my ($self, $exitcode) = @_;
my $task_id = $self->task_id();
# Perl/mysql sillyness.
if ($exitcode == 255) {
$exitcode = -1;
}
DBQueryWarn("update web_tasks set process_id=0, ".
" exited=now(), exitcode='$exitcode' ".
"where task_id='$task_id'")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment