Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b339509d authored by Vasu Nori's avatar Vasu Nori
Browse files

sqlite error "unsupported file format" = corruption

sometimes sqlite corruption is so egregious that the sqlite
doesn't even think the file is of supported formatl; ie., the file
header is bad. treat this as corruption.
this check used to be done in sqlite3.c - move it to android code
so that we have less android-changes in sqlite3.c

depends on Change-Id: I334286a1a377b962b1a97dd2af00e194f035090e

Change-Id: Ide8cd1053b1ec00372fbc87caaaaefb408ce9104
parent 0a87ae79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -531,6 +531,7 @@ void throw_sqlite3_exception(JNIEnv* env, int errcode,
            exceptionClass = "android/database/sqlite/SQLiteDiskIOException";
            break;
        case SQLITE_CORRUPT:
        case SQLITE_NOTADB: // treat "unsupported file format" error as corruption also
            exceptionClass = "android/database/sqlite/SQLiteDatabaseCorruptException";
            break;
        case SQLITE_CONSTRAINT: