Permalink
Browse files

get rid of unneeded UpdateVersion when creating a new database, and d…

…rop the fallback to sqlite - it's unlikely that the sqlite db is in any way in sync with the mysql one
  • Loading branch information...
1 parent 614714b commit 3e93cc578f0da7a5b26538e4a766275d75940cce Jonathan Marshall committed Jul 7, 2012
Showing with 2 additions and 13 deletions.
  1. +2 −13 xbmc/dbwrappers/Database.cpp
View
15 xbmc/dbwrappers/Database.cpp
@@ -331,20 +331,9 @@ bool CDatabase::Open(const DatabaseSettings &settings)
// drop back to the previous version and try that
version--;
}
-
- // unable to open any version fall through to create a new one
- if (Connect(latestDb, dbSettings, true) && UpdateVersion(latestDb))
- {
+ // try creating a new one
+ if (Connect(latestDb, dbSettings, true))
return true;
- }
- // safely fall back to sqlite as appropriate
- else if ( ! m_sqlite )
- {
- CLog::Log(LOGDEBUG, "Falling back to sqlite.");
- dbSettings = settings;
- dbSettings.type = "sqlite3";
- return Open(dbSettings);
- }
// failed to update or open the database
Close();

0 comments on commit 3e93cc5

Please sign in to comment.