Ticket #5286: mythtv-5286-allow_PromptForSchemaUpgrade_to_check_for_empty_DB.patch

File mythtv-5286-allow_PromptForSchemaUpgrade_to_check_for_empty_DB.patch, 1.0 KB (added by sphery <mtdean@…>, 12 years ago)

Remove redundant "new database" check before call to PromptForSchemaUpgrade?()

  • libs/libmythtv/dbcheck.cpp

     
    559559        dbutil.BackupDB(backupResult);
    560560#endif
    561561
    562     if (dbver != "0")
     562    switch (gContext->PromptForSchemaUpgrade(
     563                dbver, currentDatabaseVersion, backupResult))
    563564    {
    564         switch (gContext->PromptForSchemaUpgrade(
    565                     dbver, currentDatabaseVersion, backupResult))
    566         {
    567             case MYTH_SCHEMA_USE_EXISTING: return true;  // Don't upgrade
    568             case MYTH_SCHEMA_ERROR:
    569             case MYTH_SCHEMA_EXIT:         return false;
    570             case MYTH_SCHEMA_UPGRADE:      break;
    571         }
     565        case MYTH_SCHEMA_USE_EXISTING: return true;  // Don't upgrade
     566        case MYTH_SCHEMA_ERROR:
     567        case MYTH_SCHEMA_EXIT:         return false;
     568        case MYTH_SCHEMA_UPGRADE:      break;
    572569    }
    573570
    574571    MSqlQuery query(MSqlQuery::InitCon());