Commit 14b69af6 authored by Leigh Stoller's avatar Leigh Stoller

Fix for mysql 5.7; cannot set an integer column to ''. Use '0' instead,

this used to work, odd that we even did this.
parent c09b81f3
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -259,7 +259,7 @@ EOT
}
if (!$found) {
Debug("Not idle: $pid/$eid\n");
DBQueryFatal("update experiments set swap_requests='' ".
DBQueryFatal("update experiments set swap_requests='0' ".
"where pid='$pid' and eid='$eid'")
if (! $i);
} else {
......
......@@ -779,7 +779,7 @@ sub doSwapout($) {
# Since this is an actual swapout,
# reset our count of swap out nag emails sent.
#
DBQueryWarn("update experiments set swap_requests='', ".
DBQueryWarn("update experiments set swap_requests='0', ".
" sim_reswap_count='0' ".
"where eid='$eid' and pid='$pid'");
} else {
......
......@@ -621,7 +621,7 @@ if ($thumb && !$idle) {
if ($swapreqs && !$isidle) {
$swapreqs = "";
mysql_query("update experiments set swap_requests='' ".
mysql_query("update experiments set swap_requests='0' ".
"where pid='$pid' and eid='$eid'");
}
......@@ -631,7 +631,7 @@ if ($thumb && !$idle) {
$lastswapreq=$row["lastreq"];
if ($lastswapreq > $idletime) {
# My last request was from _before_ it was idle this time
mysql_query("update experiments set swap_requests='' ".
mysql_query("update experiments set swap_requests='0' ".
"where pid='$pid' and eid='$eid'");
$swapreq=0;
}
......
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