Fixed critical bug in upgrade procedure
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 21 Feb 2005 19:29:42 +0000 (19:29 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 21 Feb 2005 19:29:42 +0000 (19:29 +0000)
src/server/tools/nxdbmgr/upgrade.cpp

index 00209da..36c85d4 100644 (file)
@@ -118,7 +118,7 @@ static BOOL H_UpgradeFromV20(void)
          dwFlags = 0;
          for(j = 1; j <= 6; j++)
             if (DBGetFieldLong(hResult, i, j))
-               dwFlags |= m_dwFlag[j];
+               dwFlags |= m_dwFlag[j - 1];
          _sntprintf(szQuery, 256, _T("UPDATE nodes SET node_flags=%ld WHERE id=%ld"),
                     dwFlags, DBGetFieldULong(hResult, i, 0));
          if (!SQLQuery(szQuery))