You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2009/02/20 19:06:30 UTC

svn commit: r746313 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm

Author: fapeeler
Date: Fri Feb 20 18:06:29 2009
New Revision: 746313

URL: http://svn.apache.org/viewvc?rev=746313&view=rev
Log:
VCL-99

change "which of those are loaded" query to determine loaded images modified to only consider a image loaded if exists two or more times


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm?rev=746313&r1=746312&r2=746313&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm Fri Feb 20 18:06:29 2009
@@ -308,12 +308,15 @@
 	$inlist = join(',', @imgids);
 	my $select_loaded = "
         SELECT
-        DISTINCT(currentimageid)
+        DISTINCT(currentimageid),
+	COUNT(currentimageid) AS count
         FROM
         computer
         WHERE
         currentimageid IN ($inlist)
-        AND stateid = 2";
+        AND stateid = 2
+	GROUP BY currentimageid
+          HAVING count > 1";
 	@data = database_select($select_loaded);
 	my @loaded;
 	foreach (@data) {