SQLite

View Ticket
Login
Ticket Hash: c39ff61c43bb72660b776df7be505671852df5be
Title: Erroneous FK constraint failure when reusing statement
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Virtual_Machine Resolution: Fixed
Last Modified: 2010-04-30 06:00:18
Version Found In: 3.6.23.1
Description:
If a call to sqlite3_step() fails due to an immediate FK violation, after resetting the statement it continues to fail with SQLITE_CONSTRAINT, even if the bound parameters or database contents have changed so that it should succeed.

The problem is that the "immediate FK constraint counter" associated with the statement handle is not being reset to 0 in sqlite3_reset().

The attached C program demonstrates the problem.


Attachments: