Skip to content

Assertion failure when compiled with SQLITE_DEBUG #55

Closed
@m4heshd

Description

@m4heshd

What I wanted to know is if this is the intended behavior for Sqlitemc.

I'm compiling Sqlitemc with SQLITE_DEBUG set just for the tests. The assertion failure happens if you try to decrypt the DB with an incorrect passphrase (Sqleet) using PRAGMA key which exactly is the scenario I'm trying to test with Mocha. But since JS doesn't catch C++ runtime errors, the whole test process fails because of it.

// Line 53647 in amalgamated sqlite3.c

case PAGER_READER:
  assert( pPager->errCode==SQLITE_OK ); //⬅ this one
  assert( p->eLock!=UNKNOWN_LOCK );
  assert( p->eLock>=SHARED_LOCK );
  break;

Was this assert() supposed fail on the above mentioned scenario? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions