Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: Incorrect foreign key mismatch error

Aperta
#4,155 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
cpp, sqlite
Ambito
database, desktop

Direzione di ricerca

Inizia riproducendo l’eliminazione dalla scheda Browse Data con lo schema fornito single_drives e drive_cpu_boards, quindi confrontala con l’eliminazione al di fuori del browser. Traccia il percorso di eliminazione di una riga nel browser e verifica che l’eliminazione di una riga non segnali più una discrepanza di chiave esterna in questo caso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What did you do?

With the tables:

CREATE TABLE IF NOT EXISTS single_drives(
        drive_sequential_number     INTEGER PRIMARY KEY,
        drive_serial_number         TEXT NOT NULL, 
        drive_model                 TEXT, 
        base_board                  INTEGER NOT NULL, 
        cpu_board                   INTEGER, 
        transistor_board            INTEGER, 
        filter_board                INTEGER, 
        fpga_firmware               TEXT,
        dsp_firmware                TEXT, 
        boot_version                TEXT, 
        notes                       TEXT, 
        service_notes               TEXT, 
        previous_sequential_number  INTEGER,
        UNIQUE(drive_sequential_number),
        UNIQUE(drive_serial_number),
        FOREIGN KEY(base_board)                 REFERENCES drive_base_boards(base_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL,
        FOREIGN KEY(cpu_board)                  REFERENCES drive_cpu_boards(cpu_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL,
        FOREIGN KEY(transistor_board)           REFERENCES drive_transistor_boards(transistor_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL,
        FOREIGN KEY(filter_board)               REFERENCES drive_cpu_boards(filter_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL
        FOREIGN KEY(previous_sequential_number) REFERENCES single_drives(drive_sequential_number)
            ON UPDATE CASCADE
            ON DELETE SET NULL

CREATE TABLE IF NOT EXISTS drive_cpu_boards(
        cpu_board_id               INTEGER PRIMARY KEY,
        cpu_board_serial_number    TEXT NOT NULL,
        UNIQUE(cpu_board_id)
        UNIQUE(cpu_board_serial_number)
        )

(other tables are present in the database, but I don't believe they are relevant to this error)
I attempted to delete a row from the "single_drives" table by highlighting it in the Browse Data tab and pressing delete.

What did you expect to see?

I expected the row to be deleted.

What did you see instead?
Image I received this error message. This occurs no matter the row I try to delete, and errors based on this same foreign key mismatch occur in other parts of the database as well.

I am able to delete rows from this and other tables when not using the browser, so this seems to be an issue with the browser and not the DB schema itself

DB4S Version

3.13.1

What OS are you seeing the problem on?

Windows

OS version

Windows 11

Relevant log output

Prevention against duplicate issues
  • I have searched for similar issues
Lingua principale
C++
Stelle
24.6k
Fork
2.4k
Merge medio
2g 8h
PR unite (30g)
4

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sqlitebrowser/sqlitebrowser

Tutte le issue di sqlitebrowser/sqlitebrowser

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.