Overview
Artifact ID: | 2f1cb38602b36b0acce4637e173b81962a403b4fd34888839857717768eba915 |
---|---|
Ticket: | 79cad5e4b2e219dd197242e9e5f4ef950f554684
UPSERT results in a corrupt database |
User & Date: | drh 2018-07-11 13:37:14 |
Changes
- icomment:
The problem was that the affinity change from '1' to 1 on the PRIMARY KEY column was happening on the first constraint check in bytecode order, which is the UNIQUE constraint. But the PRIMARY KEY constraint was checked first, and hence was checked before the affinity change. The fix was to move the affinity change to before the branch that reorders the constraint checks for the UPSERT.
- login: "drh"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Fixed"