SQLITE_DBCONFIG_DEFENSIVE

The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the "defensive" flag for a database connection. When the defensive flag is enabled, language features that allow ordinary SQL to deliberately corrupt the database file are disabled. The disabled features include but are not limited to the following:

  • The PRAGMA writable_schema=ON statement.

  • The PRAGMA journal_mode=OFF statement.

  • The PRAGMA schema_version=N statement.

  • Writes to the sqlite_dbpage virtual table.

  • Direct writes to shadow tables.

Additional sqlite3_db_config() arguments: int int*