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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Oct 31 19:54:08 CET 2009


Author: mattm
Date: 2009-10-31 19:54:07 +0100 (Sat, 31 Oct 2009)
New Revision: 5770

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/tasks_sql.h
Log:
	* src/tasks_sql.h: Update migrator comments about appending columns.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-10-31 18:47:20 UTC (rev 5769)
+++ trunk/openvas-manager/ChangeLog	2009-10-31 18:54:07 UTC (rev 5770)
@@ -1,5 +1,9 @@
 2009-10-31  Matthew Mundell <matthew.mundell at intevation.de>
 
+	* src/tasks_sql.h: Update migrator comments about appending columns.
+
+2009-10-31  Matthew Mundell <matthew.mundell at intevation.de>
+
 	Name columns explicitly in SELECT statements instead of using wildcards.
 	This makes it safe for a migrator to add a missing column to the end of
 	the table when create_table would have created the column somewhere

Modified: trunk/openvas-manager/src/tasks_sql.h
===================================================================
--- trunk/openvas-manager/src/tasks_sql.h	2009-10-31 18:47:20 UTC (rev 5769)
+++ trunk/openvas-manager/src/tasks_sql.h	2009-10-31 18:54:07 UTC (rev 5770)
@@ -632,7 +632,6 @@
    * would be simply to update the version number to 1 in the database by
    * hand. */
 
-  /** @todo Only safe because scan_run_status is the last col in version 1. */
   sql ("ALTER TABLE reports ADD COLUMN scan_run_status INTEGER;");
 
   /* SQLite 3.1.3 and earlier requires a VACUUM before it can read
@@ -730,11 +729,11 @@
    * started working after version 3. */
 
   sql ("DELETE from lsc_credentials;");
-  /**
-   * @todo This is a problem, because these columns are added on the end
-   *       of the table, so columns referenced by position in * queries may
-   *       be wrong (for example, with the iterator returned by
-   *       init_lsc_credential_iterator). */
+  /* Before revision 5733 this could have caused problems, because these
+   * columns are added on the end of the table, so columns referenced by
+   * position in * queries may be wrong (for example, with the iterator
+   * returned by init_lsc_credential_iterator).  Since 5733 the queries
+   * name all columns explicitly. */
   sql ("ALTER TABLE lsc_credentials ADD COLUMN password;");
   sql ("ALTER TABLE lsc_credentials ADD COLUMN exe;");
 
@@ -763,7 +762,6 @@
 
   /* The nvt_selectors table got a family column. */
 
-  /** @todo Only safe because family is the last column in version 3. */
   sql ("ALTER TABLE nvt_selectors ADD COLUMN family;");
 
   init_nvt_selector_iterator (&nvts, NULL, 2);



More information about the Openvas-commits mailing list