Commit 5ea56852 authored by unknown's avatar unknown
Browse files

ndb_restore: more compatablitity checks

parent ae26e002
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -487,6 +487,25 @@ main(int argc, char** argv)
  /**
   * check wheater we can restore the backup (right version).
   */
  // in these versions there was an error in how replica info was
  // stored on disk
  if (version >= MAKE_VERSION(5,1,3) && version <= MAKE_VERSION(5,1,9))
  {
    err << "Restore program incompatible with backup versions between "
        << getVersionString(MAKE_VERSION(5,1,3), 0, buf, sizeof(buf))
        << " and "
        << getVersionString(MAKE_VERSION(5,1,9), 0, buf, sizeof(buf))
        << endl;
    exitHandler(NDBT_FAILED);
  }

  if (version > NDB_VERSION)
  {
    err << "Restore program older than backup version. Not supported. "
        << "Use new restore program"
    exitHandler(NDBT_FAILED);
  }

  debug << "Load content" << endl;
  int res  = metaData.loadContent();