diff options
author | tamland <thomas.amland@gmail.com> | 2016-02-26 18:01:15 +0100 |
---|---|---|
committer | tamland <thomas.amland@gmail.com> | 2016-02-26 18:01:15 +0100 |
commit | e63526096752a48e9e5dcf310b645e7f33a7c69e (patch) | |
tree | 1acbabe39cfa0b114f34a1c14513608357a081e9 | |
parent | acecc115ba100f5267f5fd5a760baccc92d76f43 (diff) | |
parent | 560ca441e60e9b9361bb37b687a6f2fa4b146d64 (diff) |
Merge pull request #9166 from tamland/fix_drop_analytics
[database] dont attempt to drop automatically created indices when clearing analytics
-rw-r--r-- | xbmc/dbwrappers/sqlitedataset.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/dbwrappers/sqlitedataset.cpp b/xbmc/dbwrappers/sqlitedataset.cpp index 77fccc3040..ca11c7c5b2 100644 --- a/xbmc/dbwrappers/sqlitedataset.cpp +++ b/xbmc/dbwrappers/sqlitedataset.cpp @@ -321,7 +321,7 @@ int SqliteDatabase::drop_analytics(void) { result_set res; CLog::Log(LOGDEBUG, "Cleaning indexes from database %s at %s", db.c_str(), host.c_str()); - sprintf(sqlcmd, "SELECT name FROM sqlite_master WHERE type == 'index'"); + sprintf(sqlcmd, "SELECT name FROM sqlite_master WHERE type == 'index' AND sql IS NOT NULL"); if ((last_err = sqlite3_exec(conn, sqlcmd, &callback, &res, NULL)) != SQLITE_OK) return DB_UNEXPECTED_RESULT; for (size_t i=0; i < res.records.size(); i++) { |