Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
49e3f711
Commit
49e3f711
authored
Dec 09, 2008
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a sanity check to make sure that the uuid is really unique
locally.
parent
95f63aaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
db/Experiment.pm.in
db/Experiment.pm.in
+17
-0
No files found.
db/Experiment.pm.in
View file @
49e3f711
...
...
@@ -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
.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment