Index: trunk/ippTools/src/pxchip.c
===================================================================
--- trunk/ippTools/src/pxchip.c	(revision 21402)
+++ trunk/ippTools/src/pxchip.c	(revision 23386)
@@ -128,5 +128,5 @@
 }
 
-bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state)
+bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state, const bool magicked)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -139,6 +139,6 @@
     }
 
-    char *query = "UPDATE chipRun SET state = '%s' WHERE chip_id = %" PRId64;
-    if (!p_psDBRunQueryF(config->dbh, query, state, chip_id)) {
+    char *query = "UPDATE chipRun SET state = '%s', magicked = %d WHERE chip_id = %" PRId64;
+    if (!p_psDBRunQueryF(config->dbh, query, state, magicked, chip_id)) {
         psError(PS_ERR_UNKNOWN, false,
                 "failed to change state for chip_id %" PRId64, chip_id);
@@ -158,4 +158,14 @@
     if (!pxIsValidState(state)) {
         psError(PS_ERR_UNKNOWN, false, "invalid chipRun state: %s", state);
+        return false;
+    }
+
+    if (!strcmp(state, "full")) {
+        // There are states that need to be met for a run to be set to full that we don't
+        // check here.
+        // for example all of the run's Imfiles must have chipProcessedImfile.data_state == "full"
+        // chipRun.magicked = (SUM(!chipProcessedImfile.magicked) = 0)
+        // so don't do allow setting the state to full
+        psError(PS_ERR_UNKNOWN, true, "cannot use -updaterun so set chipRun state to full");
         return false;
     }
@@ -253,5 +263,7 @@
             dvodb,
             tess_id,
-            end_stage)
+            end_stage, 
+            0           // magicked
+            )
     ) {
         if (!psDBRollback(config->dbh)) {
