[GRASS-SVN] r34497 - grass/trunk/vector/v.to.db

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 26 05:28:41 EST 2008


Author: neteler
Date: 2008-11-26 05:28:41 -0500 (Wed, 26 Nov 2008)
New Revision: 34497

Modified:
   grass/trunk/vector/v.to.db/query.c
   grass/trunk/vector/v.to.db/update.c
Log:
debug fixes

Modified: grass/trunk/vector/v.to.db/query.c
===================================================================
--- grass/trunk/vector/v.to.db/query.c	2008-11-26 09:31:44 UTC (rev 34496)
+++ grass/trunk/vector/v.to.db/query.c	2008-11-26 10:28:41 UTC (rev 34497)
@@ -81,8 +81,6 @@
     if ((Fi = Vect_get_field(Map, options.qfield)) == NULL)
 	G_fatal_error(_("Database connection not defined for layer %d. Use v.db.connect first."),
 		      options.qfield);
-    G_debug(3, "Reading from map <%s>, query layer %d: updating table <%s>, column <%s>",
-            options.name, options.qfield, Fi->table, Fi->key);
 
     /* Open driver */
     driver = db_start_driver_open_database(Fi->driver, Fi->database);

Modified: grass/trunk/vector/v.to.db/update.c
===================================================================
--- grass/trunk/vector/v.to.db/update.c	2008-11-26 09:31:44 UTC (rev 34496)
+++ grass/trunk/vector/v.to.db/update.c	2008-11-26 10:28:41 UTC (rev 34497)
@@ -30,8 +30,8 @@
     if ((Fi = Vect_get_field(Map, options.field)) == NULL)
 	G_fatal_error(_("Database connection not defined for layer %d. Use v.db.connect first."),
 		      options.field);
-    G_debug(3, "Reading from map <%s>, query layer %d: updating table <%s>, column <%s>", 
-            options.name, options.qfield, Fi->table, Fi->key);
+    G_debug(3, "Reading from map <%s>, query layer %d (table <%s>): updating table <%s>, column <%s>", 
+            options.name, options.qfield, qFi->table, Fi->table, Fi->key);
 
     /* Open driver */
     driver = db_start_driver_open_database(Fi->driver, Fi->database);
@@ -44,6 +44,7 @@
 
     /* select existing categories to array (array is sorted) */
     vstat.select = db_select_int(driver, qFi->table, Fi->key, NULL, &catexst);
+    G_debug(3, "Existing categories: %d", vstat.select);
 
     /* create beginning of stmt */
     switch (options.option) {
@@ -69,8 +70,6 @@
 	break;
     }
 
-    G_debug(3, "Existing categories: %d", vstat.rcat);
-
     /* update */
     G_message(_("Updating database..."));
     for (i = 0; i < vstat.rcat; i++) {



More information about the grass-commit mailing list