SQLite
Ticket Change Details
Not logged in
Overview

Artifact ID: 151ec2376572a55d7faa15df02e54c6928fcc0b53baa9a80e09f4a6cc1602e3d
Ticket: 79cad5e4b2e219dd197242e9e5f4ef950f554684
UPSERT results in a corrupt database
User & Date: drh 2018-07-11 12:11:13
Changes

  1. Change foundin to "3.24.0"
  2. Change icomment to:

    An UPSERT discovered by OSSFuzz results in a corrupt database file:

    CREATE TABLE t1(
      a INT,
      b INT,
      c INT UNIQUE,
      PRIMARY KEY(a,b)
    ) WITHOUT ROWID;
    INSERT INTO t1(a,b) VALUES(json(3),4),(1,2) ON CONFLICT(a,b) DO NOTHING;
    PRAGMA integrity_check;
    

    The corruption is a missing entry from the unique index and is easily fixed using REINDEX. Nevertheless, this should not be happening.

  3. Change login to "drh"
  4. Change mimetype to "text/x-fossil-wiki"
  5. Change severity to "Severe"
  6. Change status to "Open"
  7. Change title to "UPSERT results in a corrupt database"
  8. Change type to "Code_Defect"