[Openvas-commits] r9401 - in trunk/openvas-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 12 22:31:28 CET 2010


Author: mattm
Date: 2010-11-12 22:31:26 +0100 (Fri, 12 Nov 2010)
New Revision: 9401

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/manage_sql.c
Log:
	* src/manage_sql.c (report_count): Put the zero comparisons first in the
	overrides select.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2010-11-12 16:00:17 UTC (rev 9400)
+++ trunk/openvas-manager/ChangeLog	2010-11-12 21:31:26 UTC (rev 9401)
@@ -1,5 +1,10 @@
 2010-11-12  Matthew Mundell <matthew.mundell at greenbone.net>
 
+	* src/manage_sql.c (report_count): Put the zero comparisons first in the
+	overrides select.
+
+2010-11-12  Matthew Mundell <matthew.mundell at greenbone.net>
+
 	* src/manage_sql.c (report_count): Convert the complex override select to
 	multiple simpler selects, to increase speed.
 

Modified: trunk/openvas-manager/src/manage_sql.c
===================================================================
--- trunk/openvas-manager/src/manage_sql.c	2010-11-12 16:00:17 UTC (rev 9400)
+++ trunk/openvas-manager/src/manage_sql.c	2010-11-12 21:31:26 UTC (rev 9401)
@@ -9032,11 +9032,10 @@
                  " OR (overrides.owner ="
                  " (SELECT users.ROWID FROM users"
                  "  WHERE users.uuid = '%s')))"
-                 // FIX 0 first
-                 " AND (overrides.task = %llu"
-                 "      OR overrides.task = 0)"
-                 " AND (overrides.result = $result" // 2
-                 "      OR overrides.result = 0)"
+                 " AND (overrides.task = 0"
+                 "      OR overrides.task = %llu)"
+                 " AND (overrides.result = 0"
+                 "      OR overrides.result = $result)" // 2
                  " AND (overrides.hosts is NULL"
                  "      OR overrides.hosts = \"\""
                  "      OR hosts_contains (overrides.hosts, $host))" // 3



More information about the Openvas-commits mailing list