Commit 49e3f711 authored by Leigh Stoller's avatar Leigh Stoller

Add a sanity check to make sure that the uuid is really unique

locally.
parent 95f63aaa
......@@ -579,6 +579,23 @@ sub Create($$$$)
}
}
#
# Lets be real sure that the UUID is really unique.
#
$query_result =
DBQueryWarn("select pid,eid,idx from experiment_stats ".
"where eid_uuid='$uuid'");
if (! $query_result) {
DBQueryWarn("unlock tables");
return undef;
}
if ($query_result->numrows) {
DBQueryWarn("unlock tables");
tberror("Experiment uuid $uuid already exists; ".
"this is bad!");
return undef;
}
#
# Insert the record. This reserves the pid/eid for us.
#
......
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