Commit 0d0f15eb authored by Mike Hibler's avatar Mike Hibler

Fix another image version related SQL error.

parent c2f70a6c
......@@ -574,9 +574,11 @@ if (!exists($newimageid_args{"mbr_version"}) && defined($node_id)) {
# to version 1.
#
my $query_result =
DBQueryFatal("select mbr_version from partitions as p, images as i ".
" where p.imageid=i.imageid and p.node_id='$node_id' ".
" group by mbr_version");
DBQueryFatal("select mbr_version from ".
" partitions as p,image_versions as i ".
" where p.imageid=i.imageid ".
" and p.imageid_version=i.version ".
" and p.node_id='$node_id' group by mbr_version");
if ($query_result && $query_result->numrows == 1) {
($mbrvers) = $query_result->fetchrow_array();
}
......
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