Commit 689fbd13 authored by Leigh Stoller's avatar Leigh Stoller

Bug fixes ...

parent b6538672
...@@ -122,7 +122,7 @@ while (my $rowref = $describe_result->fetchrow_hashref()) { ...@@ -122,7 +122,7 @@ while (my $rowref = $describe_result->fetchrow_hashref()) {
DBQueryFatal("update temp_images set creator_idx='$user_idx'"); DBQueryFatal("update temp_images set creator_idx='$user_idx'");
} }
elsif ($slot eq "uuid") { elsif ($slot eq "uuid") {
douuids++; $douuids++;
} }
} }
...@@ -155,16 +155,14 @@ while (my ($osid) = $query_result->fetchrow_array()) { ...@@ -155,16 +155,14 @@ while (my ($osid) = $query_result->fetchrow_array()) {
# #
# Update temp_os_info with locally derived osids. nextosid as well. # Update temp_os_info with locally derived osids. nextosid as well.
# #
$query_result->dataseek(0); foreach my $osid (keys(%local_osids)) {
while (my ($osid) = $query_result->fetchrow_array()) {
my $newosid = $local_osids{$osid}; my $newosid = $local_osids{$osid};
DBQueryFatal("update temp_os_info set osid='$newosid' ". DBQueryFatal("update temp_os_info set osid='$newosid' ".
"where osid='$osid'"); "where osid='$osid'");
DBQueryFatal("update temp_os_info set nextosid='$newosid' ". DBQueryFatal("update temp_os_info set nextosid='$newosid' ".
"where nextosid='$osid'"); "where nextosid='$osid'");
if ($uuids) { if ($douuids) {
my $uuid = NewUUID(); my $uuid = NewUUID();
DBQueryFatal("update temp_os_info set uuid='$uuid' ". DBQueryFatal("update temp_os_info set uuid='$uuid' ".
...@@ -198,7 +196,7 @@ while (my ($imageid) = $query_result->fetchrow_array()) { ...@@ -198,7 +196,7 @@ while (my ($imageid) = $query_result->fetchrow_array()) {
DBQueryFatal("update temp_images set imageid='$newimageid' ". DBQueryFatal("update temp_images set imageid='$newimageid' ".
"where imageid='$imageid'"); "where imageid='$imageid'");
if ($uuids) { if ($douuids) {
my $uuid = NewUUID(); my $uuid = NewUUID();
DBQueryFatal("update temp_images set uuid='$uuid' ". DBQueryFatal("update temp_images set uuid='$uuid' ".
......
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