/ Ticket Change Details

Artifact ID: 2f1cb38602b36b0acce4637e173b81962a403b4fd34888839857717768eba915
Ticket: 79cad5e4b2e219dd197242e9e5f4ef950f554684
UPSERT results in a corrupt database
User & Date: drh 2018-07-11 13:37:14

  1. Change icomment to:

    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.

  2. Change login to "drh"
  3. Change mimetype to "text/x-fossil-wiki"
  4. Change resolution to "Fixed"
  5. Change status to "Fixed"