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

Commit 08cbdad5 authored by Jeff Brown's avatar Jeff Brown
Browse files

Don't log SQLITE_SCHEMA errors.

These errors are usually transient.  SQLite automatically retries
queries up to 5 times before actually reporting an error to the
application.  We expect SQLITE_SCHEMA errors to occur occasionally
due to the prepared statement cache, and it is ok.

If SQLite fails to automatically resolve a schema error, then
a SQLiteException will be thrown as usual.

Bug: 6114391
Change-Id: I0cdafa1a1db5c567b95bec0c41310802fe75a8c7
parent 8dc3cc2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static const int SOFT_HEAP_LIMIT = 8 * 1024 * 1024;
// Called each time a message is logged.
static void sqliteLogCallback(void* data, int iErrCode, const char* zMsg) {
    bool verboseLog = !!data;
    if (iErrCode == 0 || iErrCode == SQLITE_CONSTRAINT) {
    if (iErrCode == 0 || iErrCode == SQLITE_CONSTRAINT || iErrCode == SQLITE_SCHEMA) {
        if (verboseLog) {
            ALOGV(LOG_VERBOSE, SQLITE_LOG_TAG, "(%d) %s\n", iErrCode, zMsg);
        }