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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user