Skip to content

[Bug]: PRAGMA foreign_keys = ON; fails with "Execution aborted by user" on a new database #3938

@sajmy

Description

@sajmy

What did you do?

  1. Launched DB Browser for SQLite.
  2. Created a new, empty database (File -> New Database, saved as test.db).
  3. Navigated to the "Execute SQL" tab.
  4. Executed the following SQL statement:

PRAGMA foreign_keys = ON;

What did you expect to see?

I expected the command to execute successfully, typically indicated by a message like "Query executed successfully" in the status bar, and for foreign key enforcement to be enabled for the current database connection. No error messages should appear.

What did you see instead?

The command failed, and the following error message was displayed in the "Execute SQL" log/output area:

Execution finished with errors.
Result: Execution aborted by user
At line 1:
PRAGM

This occurred without any manual user intervention to abort the query. The same behaviour persists even after:

  • Restarting the application.
  • Restarting the computer.
  • Attempting this on a completely fresh database instance.
  • Reinstalling DB Browser for SQLite / Trying a portable version]

This issue prevents the proper use and testing of foreign key constraints. Further attempts to use commands like PRAGMA foreign_key_check; also fail, often with a "foreign key mismatch" error, even on an empty database or a database where such mismatches should not exist, presumably because foreign_keys could not be enabled correctly.

DB4S Version

3.13.1

What OS are you seeing the problem on?

Windows

OS version

Windows 11 Pro (Version 24H2, OS build 26100.3775)

Relevant log output

Execution finished with errors.
Result: Execution aborted by user
At line 1:
PRAGM

Prevention against duplicate issues

  • I have searched for similar issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy